agentkit-sdk-python 0.8.9__tar.gz → 0.9.1__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.8.9 → agentkit_sdk_python-0.9.1}/PKG-INFO +1 -1
- agentkit_sdk_python-0.9.1/agentkit/frameworks/_agentsentry.py +192 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/frameworks/langchain.py +17 -4
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/frameworks/langgraph.py +11 -1
- agentkit_sdk_python-0.9.1/agentkit/plugins/agentsentry_v3.py +175 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/plugins/llm_shield.py +161 -8
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/sdk/runtime/gateway.py +1 -5
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/cli_deploy.py +24 -1
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/cli_launch.py +18 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/executors/deploy_executor.py +10 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/executors/lifecycle_executor.py +10 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/harness/deploy.py +4 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/runners/ve_agentkit.py +68 -3
- agentkit_sdk_python-0.9.1/agentkit/toolkit/runtime_recreate_policy.py +125 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/sdk/client.py +16 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/sdk/deployer.py +10 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/sdk/lifecycle.py +10 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/strategies/base_strategy.py +2 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/strategies/cloud_strategy.py +1 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/strategies/hybrid_strategy.py +1 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/version.py +1 -1
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit_sdk_python.egg-info/PKG-INFO +1 -1
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit_sdk_python.egg-info/SOURCES.txt +3 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/pyproject.toml +1 -1
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/tests/test_dependency_constraints.py +1 -1
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/tests/test_version.py +1 -1
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/LICENSE +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/MANIFEST.in +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/README.md +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/apps/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/apps/a2a_app/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/apps/a2a_app/a2a_app.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/apps/a2a_app/telemetry.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/apps/agent_server_app/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/apps/agent_server_app/agent_server_app.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/apps/agent_server_app/credential_service.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/apps/agent_server_app/inbound_auth.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/apps/agent_server_app/inbound_auth_adapter.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/apps/agent_server_app/middleware.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/apps/agent_server_app/origin.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/apps/agent_server_app/telemetry.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/apps/auth/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/apps/auth/inbound.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/apps/base_app.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/apps/langgraph_server_app/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/apps/langgraph_server_app/langgraph_server_app.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/apps/mcp_app/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/apps/mcp_app/mcp_app.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/apps/mcp_app/telemetry.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/apps/simple_app/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/apps/simple_app/simple_app.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/apps/simple_app/simple_app_handlers.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/apps/simple_app/telemetry.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/apps/utils.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/auth/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/auth/_openapi.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/auth/_redact.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/auth/_sigv4.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/auth/admin.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/auth/credential_hosting.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/auth/errors.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/auth/model_login.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/auth/oauth.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/auth/profile.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/auth/providers.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/auth/resolve.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/auth/session.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/auth/ssl_trust.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/auth/sso.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/auth/store.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/auth/sts.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/client/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/client/base_agentkit_client.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/client/base_iam_client.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/client/base_service_client.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/errors.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/frameworks/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/frameworks/_common.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/frameworks/agentcore.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/frameworks/migration.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/frameworks/model_replacement.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/frameworks/serving/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/frameworks/serving/fastapi_mount.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/frameworks/serving/langserve.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/frameworks/strands.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/identity/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/identity/_runtime_dependency.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/identity/client.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/identity/context.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/identity/errors.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/identity/jwt.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/identity/middleware.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/identity/runtime.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/identity/transport.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/identity/types.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/platform/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/platform/configuration.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/platform/console_urls.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/platform/constants.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/platform/context.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/platform/provider.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/plugins/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/sdk/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/sdk/account/client.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/sdk/account/types.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/sdk/identity/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/sdk/identity/auth.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/sdk/identity/client.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/sdk/identity/types.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/sdk/knowledge/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/sdk/knowledge/client.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/sdk/knowledge/types.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/sdk/mcp/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/sdk/mcp/client.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/sdk/mcp/types.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/sdk/memory/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/sdk/memory/client.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/sdk/memory/types.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/sdk/model_gateway/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/sdk/model_gateway/client.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/sdk/model_gateway/types.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/sdk/runtime/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/sdk/runtime/client.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/sdk/runtime/types.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/sdk/skills/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/sdk/skills/client.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/sdk/skills/types.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/sdk/tools/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/sdk/tools/client.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/sdk/tools/types.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/builders/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/builders/base.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/builders/local_docker.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/builders/ve_pipeline.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/builders/ve_sandbox_pipeline.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/__main__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/cli.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/cli_add.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/cli_auth.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/cli_build.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/cli_config.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/cli_delete.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/cli_destroy.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/cli_init.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/cli_invoke.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/cli_knowledge.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/cli_list.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/cli_logs.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/cli_memory.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/cli_model_gateway.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/cli_runtime.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/cli_skill.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/cli_skills.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/cli_skills_workflow.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/cli_status.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/cli_tools.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/cli_version.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/console_reporter.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/interactive_config.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/sandbox/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/sandbox/a2a_client.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/sandbox/agentkit_client.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/sandbox/cli.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/sandbox/cli_build.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/sandbox/cli_config.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/sandbox/cli_create.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/sandbox/cli_delete.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/sandbox/cli_exec.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/sandbox/cli_init.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/sandbox/cli_invoke.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/sandbox/cli_list.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/sandbox/cli_model_login.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/sandbox/cli_mount.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/sandbox/cli_run.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/sandbox/cli_scp.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/sandbox/cli_shell.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/sandbox/cli_web.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/sandbox/config_store.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/sandbox/env_config.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/sandbox/git_config.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/sandbox/model_config.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/sandbox/sandbox_client.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/sandbox/session_create.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/sandbox/session_sync.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/sandbox/tool_resolve.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/sandbox/tos_config.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/tool_lookup.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/cli/utils.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/config/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/config/choice_resolvers.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/config/cloud_provider.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/config/config.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/config/config_handler.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/config/config_validator.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/config/constants.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/config/dataclass_utils.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/config/docker_build_config.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/config/global_config.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/config/region_defaults.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/config/region_resolver.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/config/strategy_configs.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/config/utils.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/context.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/docker/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/docker/base_images.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/docker/container.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/docker/dockerfile/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/docker/dockerfile/manager.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/docker/dockerfile/metadata.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/docker/utils.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/errors.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/executors/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/executors/base_executor.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/executors/build_executor.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/executors/init_executor.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/executors/invoke_executor.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/executors/status_executor.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/harness/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/harness/config_builder.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/harness/env_mapping.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/models.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/reporter.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/samples/a2a.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/samples/agent_server.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/samples/basic.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/samples/basic_stream.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/samples/customer_support_assistant.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/samples/eino_a2a/agent.go +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/samples/eino_a2a/build.sh +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/samples/eino_a2a/go.mod +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/samples/eino_a2a/go.sum +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/samples/eino_a2a/main.go +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/samples/financial_analyst.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/samples/langchain_basic_stream.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/samples/simple_app_veadk.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/samples/simple_mcp_veadk.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/samples/veadk_go_a2a/agent.go +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/samples/veadk_go_a2a/build.sh +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/samples/veadk_go_a2a/go.mod +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/samples/veadk_go_a2a/go.sum +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/samples/veadk_go_a2a/main.go +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/samples/veadk_go_basic/agent.go +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/samples/veadk_go_basic/build.sh +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/samples/veadk_go_basic/go.mod +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/samples/veadk_go_basic/go.sum +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/samples/veadk_go_basic/main.go +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/templates/code-pipeline-sandbox-tos-cr-step.j2 +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/templates/code-pipeline-tos-cr-step.j2 +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/templates/golang/Dockerfile.j2 +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/templates/python/Dockerfile.j2 +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/templates/sandbox/Dockerfile.install-package +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/templates/sandbox/Dockerfile.install-skills +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/templates/sandbox/Dockerfile.web-server +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/wrappers/wrapper_basic.py.jinja2 +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/resources/wrappers/wrapper_stream.py.jinja2 +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/runners/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/runners/base.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/runners/local_docker.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/sdk/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/sdk/bindings/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/sdk/bindings/memory.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/sdk/builder.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/sdk/config.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/sdk/initializer.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/sdk/invoker.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/sdk/status.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/strategies/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/strategies/local_strategy.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/utils/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/utils/agent_parser.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/volcengine/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/volcengine/apmplus_logs.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/volcengine/code_pipeline.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/volcengine/cr.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/volcengine/iam.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/volcengine/services/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/volcengine/services/cr_service.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/volcengine/services/tos_service.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/volcengine/sts.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/volcengine/utils/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/toolkit/volcengine/utils/project_archiver.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/utils/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/utils/global_config_io.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/utils/http_defaults.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/utils/logging_config.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/utils/misc.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/utils/redact.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/utils/request.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/utils/template_utils.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit/utils/ve_sign.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit_identity/__init__.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit_identity/context.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit_identity/errors.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit_identity/jwt.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit_identity/middleware.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit_identity/py.typed +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit_identity/runtime.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit_identity/transport.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit_identity/types.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit_sdk_python.egg-info/dependency_links.txt +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit_sdk_python.egg-info/entry_points.txt +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit_sdk_python.egg-info/requires.txt +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/agentkit_sdk_python.egg-info/top_level.txt +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/setup.cfg +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/tests/test_client_uses_platform_context.py +0 -0
- {agentkit_sdk_python-0.8.9 → agentkit_sdk_python-0.9.1}/tests/test_error_hierarchy.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agentkit-sdk-python
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.1
|
|
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
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
"""Invocation-scoped AgentSentry callbacks for migrated LC/LG agents.
|
|
2
|
+
|
|
3
|
+
No global monkeypatches: only standard LangChain model/tool callbacks are covered.
|
|
4
|
+
Direct Python side effects inside graph nodes are outside this boundary.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from contextvars import ContextVar
|
|
8
|
+
from functools import wraps
|
|
9
|
+
import json
|
|
10
|
+
import threading
|
|
11
|
+
|
|
12
|
+
from agentkit.frameworks._common import adk_event
|
|
13
|
+
|
|
14
|
+
_active_guard = ContextVar("agentkit_agentsentry_guard", default=None)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class AgentSentryBlocked(RuntimeError):
|
|
18
|
+
"""Stop framework execution before a protected tool runs."""
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def _text(content):
|
|
22
|
+
if isinstance(content, str):
|
|
23
|
+
return content
|
|
24
|
+
return "\n".join(
|
|
25
|
+
item if isinstance(item, str) else item.get("text", "")
|
|
26
|
+
for item in (content or [])
|
|
27
|
+
if isinstance(item, str)
|
|
28
|
+
or isinstance(item, dict)
|
|
29
|
+
and item.get("type") == "text"
|
|
30
|
+
and isinstance(item.get("text"), str)
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def _key(name, args):
|
|
35
|
+
return name, json.dumps(
|
|
36
|
+
args, sort_keys=True, ensure_ascii=False, separators=(",", ":")
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def _make_guard(plugin, ctx):
|
|
41
|
+
# Optional framework dependency is loaded only for the private V3 path.
|
|
42
|
+
from langchain_core.callbacks import BaseCallbackHandler
|
|
43
|
+
from agentkit.plugins.agentsentry_v3 import MISSING_CALL, MISSING_PLAN
|
|
44
|
+
|
|
45
|
+
class Guard(BaseCallbackHandler):
|
|
46
|
+
raise_error = True
|
|
47
|
+
|
|
48
|
+
def __init__(self):
|
|
49
|
+
self.plans = {}
|
|
50
|
+
self.blocked = None
|
|
51
|
+
self.lock = threading.RLock()
|
|
52
|
+
self.session = {"SessionID": ctx.session.id, "RunID": ctx.invocation_id}
|
|
53
|
+
|
|
54
|
+
def remember(self, message, completed=()):
|
|
55
|
+
with self.lock:
|
|
56
|
+
plan = _text(message.content)
|
|
57
|
+
for call in getattr(message, "tool_calls", ()) or ():
|
|
58
|
+
if call.get("id") in completed:
|
|
59
|
+
continue
|
|
60
|
+
key = _key(call["name"], call["args"])
|
|
61
|
+
self.plans.setdefault(key, []).append((plan, call))
|
|
62
|
+
|
|
63
|
+
def on_llm_end(self, response, **kwargs):
|
|
64
|
+
for generations in response.generations:
|
|
65
|
+
for generation in generations:
|
|
66
|
+
message = getattr(generation, "message", None)
|
|
67
|
+
if message is not None:
|
|
68
|
+
self.remember(message)
|
|
69
|
+
|
|
70
|
+
def on_tool_start(self, serialized, input_str, *, inputs=None, **kwargs):
|
|
71
|
+
with self.lock:
|
|
72
|
+
if self.blocked:
|
|
73
|
+
raise AgentSentryBlocked(self.blocked)
|
|
74
|
+
try:
|
|
75
|
+
args = inputs if isinstance(inputs, dict) else json.loads(input_str)
|
|
76
|
+
matches = self.plans.pop(_key(serialized.get("name"), args), [])
|
|
77
|
+
except (ValueError, TypeError, AttributeError):
|
|
78
|
+
matches = []
|
|
79
|
+
# Ambiguous or missing model/tool correlation must not allow execution.
|
|
80
|
+
if len(matches) != 1:
|
|
81
|
+
self.blocked = MISSING_CALL
|
|
82
|
+
elif not matches[0][0].strip():
|
|
83
|
+
self.blocked = MISSING_PLAN
|
|
84
|
+
else:
|
|
85
|
+
plan, call = matches[0]
|
|
86
|
+
self.blocked = plugin._sentry_v3.moderate(
|
|
87
|
+
plan,
|
|
88
|
+
role="assistant",
|
|
89
|
+
hook_name="before_tool_call",
|
|
90
|
+
session_info=self.session,
|
|
91
|
+
tool_calls=[
|
|
92
|
+
{
|
|
93
|
+
"ID": call.get("id", ""),
|
|
94
|
+
"Type": "function",
|
|
95
|
+
"Function": {
|
|
96
|
+
"Name": call["name"],
|
|
97
|
+
"Arguments": json.dumps(args, ensure_ascii=False),
|
|
98
|
+
},
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
)
|
|
102
|
+
if self.blocked:
|
|
103
|
+
raise AgentSentryBlocked(self.blocked)
|
|
104
|
+
|
|
105
|
+
def on_chat_model_start(self, *args, **kwargs):
|
|
106
|
+
if self.blocked:
|
|
107
|
+
raise AgentSentryBlocked(self.blocked)
|
|
108
|
+
|
|
109
|
+
def on_llm_start(self, *args, **kwargs):
|
|
110
|
+
if self.blocked:
|
|
111
|
+
raise AgentSentryBlocked(self.blocked)
|
|
112
|
+
|
|
113
|
+
return Guard()
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
def guarded_config(config=None):
|
|
117
|
+
guard = _active_guard.get()
|
|
118
|
+
if guard is None:
|
|
119
|
+
return config
|
|
120
|
+
merged = dict(config or {})
|
|
121
|
+
callbacks = merged.get("callbacks")
|
|
122
|
+
if callbacks is None or isinstance(callbacks, list):
|
|
123
|
+
merged["callbacks"] = [*(callbacks or []), guard]
|
|
124
|
+
else:
|
|
125
|
+
callbacks = callbacks.copy()
|
|
126
|
+
callbacks.add_handler(guard, inherit=True)
|
|
127
|
+
merged["callbacks"] = callbacks
|
|
128
|
+
return merged
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
def protect_migrated_tools(method):
|
|
132
|
+
"""Use the V3 plugin already attached to ADK App; public paths are unchanged."""
|
|
133
|
+
|
|
134
|
+
@wraps(method)
|
|
135
|
+
async def wrapped(self, ctx):
|
|
136
|
+
plugins = getattr(getattr(ctx, "plugin_manager", None), "plugins", ())
|
|
137
|
+
plugin = next((p for p in plugins if getattr(p, "_sentry_v3", None)), None)
|
|
138
|
+
if plugin is None:
|
|
139
|
+
async for event in method(self, ctx):
|
|
140
|
+
yield event
|
|
141
|
+
return
|
|
142
|
+
guard = _make_guard(plugin, ctx)
|
|
143
|
+
events = method(self, ctx)
|
|
144
|
+
try:
|
|
145
|
+
while True:
|
|
146
|
+
token = _active_guard.set(guard)
|
|
147
|
+
try:
|
|
148
|
+
event = await anext(events)
|
|
149
|
+
except StopAsyncIteration:
|
|
150
|
+
break
|
|
151
|
+
except AgentSentryBlocked:
|
|
152
|
+
if not guard.blocked:
|
|
153
|
+
raise
|
|
154
|
+
break
|
|
155
|
+
finally:
|
|
156
|
+
_active_guard.reset(token)
|
|
157
|
+
if guard.blocked:
|
|
158
|
+
break
|
|
159
|
+
yield event
|
|
160
|
+
if guard.blocked:
|
|
161
|
+
yield adk_event(ctx, self.name, guard.blocked, partial=False)
|
|
162
|
+
finally:
|
|
163
|
+
token = _active_guard.set(guard)
|
|
164
|
+
try:
|
|
165
|
+
await events.aclose()
|
|
166
|
+
finally:
|
|
167
|
+
_active_guard.reset(token)
|
|
168
|
+
|
|
169
|
+
return wrapped
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
async def restore_pending_tools(graph, config):
|
|
173
|
+
"""Rebuild pending calls from this graph/thread's checkpoint on resume."""
|
|
174
|
+
guard = _active_guard.get()
|
|
175
|
+
if guard is None:
|
|
176
|
+
return
|
|
177
|
+
from agentkit.plugins.agentsentry_v3 import MISSING_CALL
|
|
178
|
+
|
|
179
|
+
try:
|
|
180
|
+
snapshot = await graph.aget_state(config)
|
|
181
|
+
messages = snapshot.values.get("messages", [])
|
|
182
|
+
completed = set()
|
|
183
|
+
for message in reversed(messages):
|
|
184
|
+
if getattr(message, "type", None) == "tool":
|
|
185
|
+
completed.add(message.tool_call_id)
|
|
186
|
+
elif getattr(message, "type", None) == "ai":
|
|
187
|
+
guard.remember(message, completed)
|
|
188
|
+
return
|
|
189
|
+
except (AttributeError, TypeError, ValueError):
|
|
190
|
+
pass
|
|
191
|
+
guard.blocked = MISSING_CALL
|
|
192
|
+
raise AgentSentryBlocked(guard.blocked)
|
|
@@ -27,6 +27,9 @@ except ImportError: # pragma: no cover - depends on optional packages.
|
|
|
27
27
|
HumanMessage = None # type: ignore[assignment]
|
|
28
28
|
|
|
29
29
|
|
|
30
|
+
from agentkit.frameworks._agentsentry import guarded_config, protect_migrated_tools
|
|
31
|
+
|
|
32
|
+
|
|
30
33
|
class LangChainAgentkitBridge(BaseAgent):
|
|
31
34
|
"""Adapt a LangChain Runnable or callable to AgentKit's ADK runtime boundary."""
|
|
32
35
|
|
|
@@ -59,7 +62,7 @@ class LangChainAgentkitBridge(BaseAgent):
|
|
|
59
62
|
last_error: Exception | None = None
|
|
60
63
|
for candidate in candidates:
|
|
61
64
|
try:
|
|
62
|
-
return await ainvoke(candidate)
|
|
65
|
+
return await ainvoke(candidate, **self._security_kwargs())
|
|
63
66
|
except Exception as exc:
|
|
64
67
|
if not is_input_shape_error(exc):
|
|
65
68
|
raise
|
|
@@ -72,7 +75,7 @@ class LangChainAgentkitBridge(BaseAgent):
|
|
|
72
75
|
last_error = None
|
|
73
76
|
for candidate in candidates:
|
|
74
77
|
try:
|
|
75
|
-
return invoke(candidate)
|
|
78
|
+
return invoke(candidate, **self._security_kwargs())
|
|
76
79
|
except Exception as exc:
|
|
77
80
|
if not is_input_shape_error(exc):
|
|
78
81
|
raise
|
|
@@ -81,6 +84,10 @@ class LangChainAgentkitBridge(BaseAgent):
|
|
|
81
84
|
raise last_error
|
|
82
85
|
|
|
83
86
|
if callable(self._runnable):
|
|
87
|
+
if self._security_kwargs():
|
|
88
|
+
raise UnsupportedFrameworkAgentError(
|
|
89
|
+
"AgentSentry tool protection requires a Runnable accepting config callbacks"
|
|
90
|
+
)
|
|
84
91
|
last_error = None
|
|
85
92
|
for candidate in candidates:
|
|
86
93
|
try:
|
|
@@ -104,7 +111,7 @@ class LangChainAgentkitBridge(BaseAgent):
|
|
|
104
111
|
for candidate in self._input_candidates(payload, text_input):
|
|
105
112
|
emitted = False
|
|
106
113
|
try:
|
|
107
|
-
async for chunk in astream(candidate):
|
|
114
|
+
async for chunk in astream(candidate, **self._security_kwargs()):
|
|
108
115
|
emitted = True
|
|
109
116
|
yield chunk
|
|
110
117
|
return
|
|
@@ -124,7 +131,7 @@ class LangChainAgentkitBridge(BaseAgent):
|
|
|
124
131
|
for candidate in self._input_candidates(payload, text_input):
|
|
125
132
|
emitted = False
|
|
126
133
|
try:
|
|
127
|
-
for chunk in stream(candidate):
|
|
134
|
+
for chunk in stream(candidate, **self._security_kwargs()):
|
|
128
135
|
emitted = True
|
|
129
136
|
yield chunk
|
|
130
137
|
return
|
|
@@ -137,6 +144,12 @@ class LangChainAgentkitBridge(BaseAgent):
|
|
|
137
144
|
if last_error is not None:
|
|
138
145
|
raise last_error
|
|
139
146
|
|
|
147
|
+
@staticmethod
|
|
148
|
+
def _security_kwargs():
|
|
149
|
+
config = guarded_config()
|
|
150
|
+
return {"config": config} if config is not None else {}
|
|
151
|
+
|
|
152
|
+
@protect_migrated_tools
|
|
140
153
|
async def _run_async_impl(
|
|
141
154
|
self,
|
|
142
155
|
ctx: InvocationContext,
|
|
@@ -37,6 +37,13 @@ from agentkit.frameworks._common import (
|
|
|
37
37
|
)
|
|
38
38
|
|
|
39
39
|
|
|
40
|
+
from agentkit.frameworks._agentsentry import (
|
|
41
|
+
guarded_config,
|
|
42
|
+
protect_migrated_tools,
|
|
43
|
+
restore_pending_tools,
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
40
47
|
LANGGRAPH_PENDING_INTERRUPT_STATE_KEY = "agentkit:langgraph:pending_interrupt"
|
|
41
48
|
_OUTPUT_FIELD_KEYS = ("answer", "output", "final", "response", "text", "messages")
|
|
42
49
|
|
|
@@ -409,14 +416,17 @@ class LangGraphAgentkitBridge(BaseAgent):
|
|
|
409
416
|
node = metadata.get("langgraph_node")
|
|
410
417
|
return isinstance(node, str) and node in self._stream_nodes
|
|
411
418
|
|
|
419
|
+
@protect_migrated_tools
|
|
412
420
|
async def _run_async_impl(
|
|
413
421
|
self,
|
|
414
422
|
ctx: InvocationContext,
|
|
415
423
|
) -> AsyncGenerator[Event, None]:
|
|
416
|
-
config = self._graph_config(ctx)
|
|
424
|
+
config = guarded_config(self._graph_config(ctx))
|
|
417
425
|
resume_pending = self._pending_interrupt(ctx) is not None
|
|
418
426
|
payload = self._run_payload(ctx)
|
|
419
427
|
graph = await self._graph_for_run(config)
|
|
428
|
+
if resume_pending:
|
|
429
|
+
await restore_pending_tools(graph, config)
|
|
420
430
|
accumulated_text = ""
|
|
421
431
|
last_update: Any = None
|
|
422
432
|
pending_update_text = ""
|
|
@@ -0,0 +1,175 @@
|
|
|
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
|
+
"""AgentSentry private Moderate V3 transport (Endpoint HMAC credentials).
|
|
15
|
+
|
|
16
|
+
Only user/before_dispatch and assistant/before_tool_call are supported.
|
|
17
|
+
No retries: a timeout is ambiguous and must not silently execute a tool.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
import json
|
|
21
|
+
import logging
|
|
22
|
+
import os
|
|
23
|
+
import time
|
|
24
|
+
import uuid
|
|
25
|
+
from urllib.parse import urlsplit
|
|
26
|
+
|
|
27
|
+
import requests
|
|
28
|
+
from volcengine.auth.SignerV4 import SignerV4
|
|
29
|
+
from volcengine.base.Request import Request
|
|
30
|
+
from volcengine.Credentials import Credentials
|
|
31
|
+
|
|
32
|
+
PATH = "/OpenTOP/V3/Lumen/Moderate"
|
|
33
|
+
BLOCK = "Your request has been blocked by the security policy."
|
|
34
|
+
UNAVAILABLE = "The security service is unavailable. Please try again later."
|
|
35
|
+
MISSING_PLAN = "Tool execution requires a visible model plan; none was provided."
|
|
36
|
+
UNSUPPORTED_INPUT = (
|
|
37
|
+
"Unsupported input: AgentSentry text moderation requires visible text."
|
|
38
|
+
)
|
|
39
|
+
MISSING_CALL = "Tool execution could not be correlated with a pending model tool call."
|
|
40
|
+
logger = logging.getLogger(__name__)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def enabled_from_env():
|
|
44
|
+
"""AGENTSENTRY_ENABLED overrides only private moderation; default is on."""
|
|
45
|
+
raw = os.getenv("AGENTSENTRY_ENABLED", "true").strip().lower()
|
|
46
|
+
if raw not in ("1", "true", "yes", "on", "0", "false", "no", "off"):
|
|
47
|
+
raise ValueError("AGENTSENTRY_ENABLED must be a boolean")
|
|
48
|
+
return raw in ("1", "true", "yes", "on")
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class AgentSentryV3:
|
|
52
|
+
def __init__(
|
|
53
|
+
self,
|
|
54
|
+
url,
|
|
55
|
+
*,
|
|
56
|
+
account_id,
|
|
57
|
+
instance_id,
|
|
58
|
+
access_key,
|
|
59
|
+
secret_key,
|
|
60
|
+
region="cn-private",
|
|
61
|
+
timeout=30,
|
|
62
|
+
):
|
|
63
|
+
parsed = urlsplit(url)
|
|
64
|
+
if (
|
|
65
|
+
parsed.scheme not in ("http", "https")
|
|
66
|
+
or not parsed.hostname
|
|
67
|
+
or parsed.username
|
|
68
|
+
or parsed.password
|
|
69
|
+
or parsed.fragment
|
|
70
|
+
or parsed.path.rstrip("/") != PATH
|
|
71
|
+
or parsed.query not in ("", "Version=2025-01-01")
|
|
72
|
+
):
|
|
73
|
+
raise ValueError("Expected AgentSentry V3 Moderate URL")
|
|
74
|
+
if not all((account_id, instance_id, access_key, secret_key, region)):
|
|
75
|
+
raise ValueError(
|
|
76
|
+
"AgentSentry V3 requires account, instance and Endpoint AK/SK"
|
|
77
|
+
)
|
|
78
|
+
self.url = url.split("?", 1)[0].rstrip("/") + "?Version=2025-01-01"
|
|
79
|
+
self.account_id, self.instance_id = account_id, instance_id
|
|
80
|
+
self.access_key, self.secret_key = access_key, secret_key
|
|
81
|
+
self.region, self.timeout = region, timeout
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_env(cls, url, timeout=30):
|
|
85
|
+
return cls(
|
|
86
|
+
url,
|
|
87
|
+
account_id=os.getenv("AGENTSENTRY_ACCOUNT_ID", ""),
|
|
88
|
+
instance_id=os.getenv("AGENTSENTRY_INSTANCE_ID", ""),
|
|
89
|
+
access_key=os.getenv("AGENTSENTRY_AK", ""),
|
|
90
|
+
secret_key=os.getenv("AGENTSENTRY_SK", ""),
|
|
91
|
+
region=os.getenv("AGENTSENTRY_REGION", "cn-private"),
|
|
92
|
+
timeout=timeout,
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
def _headers(self, body):
|
|
96
|
+
parsed = urlsplit(self.url)
|
|
97
|
+
request = Request()
|
|
98
|
+
request.set_schema(parsed.scheme)
|
|
99
|
+
request.set_method("POST")
|
|
100
|
+
request.set_host(parsed.netloc.lower())
|
|
101
|
+
request.set_path(PATH)
|
|
102
|
+
request.set_query({"Version": "2025-01-01"})
|
|
103
|
+
request.set_headers(
|
|
104
|
+
{
|
|
105
|
+
"Content-Type": "application/json",
|
|
106
|
+
"Host": parsed.netloc.lower(),
|
|
107
|
+
"X-Top-Account-Id": self.account_id,
|
|
108
|
+
}
|
|
109
|
+
)
|
|
110
|
+
request.set_body(body.decode("utf-8"))
|
|
111
|
+
SignerV4.sign(
|
|
112
|
+
request,
|
|
113
|
+
Credentials(self.access_key, self.secret_key, "clawsentry", self.region),
|
|
114
|
+
)
|
|
115
|
+
return dict(request.headers)
|
|
116
|
+
|
|
117
|
+
def moderate(self, text, *, role, hook_name, session_info=None, tool_calls=None):
|
|
118
|
+
if (role, hook_name) not in (
|
|
119
|
+
("user", "before_dispatch"),
|
|
120
|
+
("assistant", "before_tool_call"),
|
|
121
|
+
):
|
|
122
|
+
raise ValueError("Unsupported AgentSentry V3 role/hook")
|
|
123
|
+
if not isinstance(text, str) or not text.strip():
|
|
124
|
+
return MISSING_PLAN if role == "assistant" else UNSUPPORTED_INPUT
|
|
125
|
+
session = dict(session_info or {})
|
|
126
|
+
for key in ("SessionID", "RunID", "MessageID"):
|
|
127
|
+
session[key] = session.get(key) or str(uuid.uuid4())
|
|
128
|
+
now_ms = time.time_ns() // 1_000_000
|
|
129
|
+
message = {"Role": role, "MultiPart": [{"Content": text, "ContentType": 1}]}
|
|
130
|
+
if tool_calls:
|
|
131
|
+
message["ToolCall"] = tool_calls
|
|
132
|
+
payload = {
|
|
133
|
+
"Base": {"InstanceID": self.instance_id},
|
|
134
|
+
"Message": message,
|
|
135
|
+
"SessionInfo": session,
|
|
136
|
+
"SessionID": session["SessionID"],
|
|
137
|
+
"LocalTimestamp": now_ms // 1000,
|
|
138
|
+
"LocalTimestampMS": now_ms,
|
|
139
|
+
"HookName": hook_name,
|
|
140
|
+
"IsGroup": False,
|
|
141
|
+
}
|
|
142
|
+
body = json.dumps(payload, ensure_ascii=False).encode("utf-8")
|
|
143
|
+
try:
|
|
144
|
+
response = requests.post(
|
|
145
|
+
self.url,
|
|
146
|
+
headers=self._headers(body),
|
|
147
|
+
data=body,
|
|
148
|
+
timeout=self.timeout,
|
|
149
|
+
allow_redirects=False,
|
|
150
|
+
)
|
|
151
|
+
if response.status_code != 200:
|
|
152
|
+
return UNAVAILABLE
|
|
153
|
+
data = response.json()
|
|
154
|
+
result = data.get("Result") or {}
|
|
155
|
+
logger.info(
|
|
156
|
+
"AgentSentry V3 hook=%s request_id=%s decision=%s degraded=%s",
|
|
157
|
+
hook_name,
|
|
158
|
+
(data.get("ResponseMetadata") or {}).get("RequestId"),
|
|
159
|
+
(result.get("Decision") or {}).get("DecisionType"),
|
|
160
|
+
result.get("Degraded"),
|
|
161
|
+
)
|
|
162
|
+
if (data.get("ResponseMetadata") or {}).get("Error"):
|
|
163
|
+
return UNAVAILABLE
|
|
164
|
+
if result.get("Degraded") is not False:
|
|
165
|
+
return UNAVAILABLE
|
|
166
|
+
decision = (result.get("Decision") or {}).get("DecisionType")
|
|
167
|
+
if type(decision) is int and decision == 1:
|
|
168
|
+
return None
|
|
169
|
+
if type(decision) is int and decision == 2:
|
|
170
|
+
return BLOCK
|
|
171
|
+
# REPLACE/unknown decisions are stopped rather than executing unreviewed args.
|
|
172
|
+
return UNAVAILABLE
|
|
173
|
+
except (requests.RequestException, ValueError, TypeError, AttributeError):
|
|
174
|
+
logger.warning("AgentSentry V3 transport or response error")
|
|
175
|
+
return UNAVAILABLE
|