veadk-python 0.2.21__tar.gz → 0.2.23__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.
- {veadk_python-0.2.21 → veadk_python-0.2.23}/PKG-INFO +2 -2
- {veadk_python-0.2.21 → veadk_python-0.2.23}/pyproject.toml +2 -2
- {veadk_python-0.2.21 → veadk_python-0.2.23}/tests/test_cloud.py +6 -0
- veadk_python-0.2.23/veadk/a2a/remote_ve_agent.py +198 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/a2a/ve_a2a_server.py +1 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/agent.py +18 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/cli/cli_clean.py +7 -9
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/cli/cli_deploy.py +36 -10
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/cli/cli_init.py +37 -1
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/cli/cli_update.py +14 -11
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/cloud/cloud_agent_engine.py +130 -2
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/cloud/cloud_app.py +18 -6
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/configs/auth_configs.py +4 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/configs/database_configs.py +2 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_apig/ve_apig.py +134 -9
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/template/cookiecutter.json +3 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/deploy.py +3 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/ve_faas.py +34 -9
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/web_template/cookiecutter.json +3 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/deploy.py +3 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_identity/identity_client.py +333 -1
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_identity/models.py +6 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_identity/token_manager.py +0 -4
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_viking_db_memory/ve_viking_db_memory.py +17 -2
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/knowledgebase/backends/redis_backend.py +4 -3
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/knowledgebase/backends/vikingdb_knowledge_backend.py +17 -3
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/knowledgebase/knowledgebase.py +1 -1
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/memory/short_term_memory.py +6 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/memory/short_term_memory_backends/mysql_backend.py +4 -1
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/memory/short_term_memory_backends/postgresql_backend.py +4 -1
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/runner.py +11 -122
- veadk_python-0.2.23/veadk/tools/builtin_tools/agent_authorization.py +120 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tools/builtin_tools/run_code.py +1 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tools/builtin_tools/video_generate.py +5 -2
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/version.py +1 -1
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk_python.egg-info/PKG-INFO +2 -2
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk_python.egg-info/SOURCES.txt +1 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk_python.egg-info/requires.txt +1 -1
- veadk_python-0.2.21/veadk/a2a/remote_ve_agent.py +0 -145
- {veadk_python-0.2.21 → veadk_python-0.2.23}/LICENSE +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/README.md +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/setup.cfg +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/tests/test_agent.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/tests/test_evaluator.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/tests/test_knowledgebase.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/tests/test_long_term_memory.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/tests/test_misc.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/tests/test_multiple_agents.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/tests/test_runner.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/tests/test_runtime_data_collecting.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/tests/test_short_term_memory.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/tests/test_tracing.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/tests/test_ve_identity_auth_config.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/tests/test_ve_identity_function_tool.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/tests/test_ve_identity_mcp_tool.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/tests/test_ve_identity_mcp_toolset.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/a2a/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/a2a/agent_card.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/a2a/ve_agent_executor.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/a2a/ve_task_store.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/agent_builder.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/agents/loop_agent.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/agents/parallel_agent.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/agents/sequential_agent.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/auth/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/auth/base_auth.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/auth/veauth/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/auth/veauth/apmplus_veauth.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/auth/veauth/ark_veauth.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/auth/veauth/base_veauth.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/auth/veauth/cozeloop_veauth.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/auth/veauth/opensearch_veauth.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/auth/veauth/postgresql_veauth.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/auth/veauth/prompt_pilot_veauth.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/auth/veauth/speech_veauth.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/auth/veauth/utils.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/auth/veauth/vesearch_veauth.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/auth/veauth/viking_mem0_veauth.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/cli/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/cli/cli.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/cli/cli_create.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/cli/cli_eval.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/cli/cli_kb.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/cli/cli_pipeline.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/cli/cli_prompt.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/cli/cli_uploadevalset.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/cli/cli_web.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/cloud/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/config.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/configs/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/configs/model_configs.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/configs/tool_configs.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/configs/tracing_configs.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/consts.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/evaluation/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/evaluation/adk_evaluator/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/evaluation/adk_evaluator/adk_evaluator.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/evaluation/base_evaluator.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/evaluation/deepeval_evaluator/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/evaluation/deepeval_evaluator/deepeval_evaluator.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/evaluation/eval_set_file_loader.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/evaluation/eval_set_recorder.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/evaluation/types.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/evaluation/utils/prometheus.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_apig/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_apig/ve_apig_utils.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_code_pipeline/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_code_pipeline/ve_code_pipeline.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_cozeloop/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_cozeloop/ve_cozeloop.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_cr/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_cr/ve_cr.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/clean.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/config.yaml.example +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/agent.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/app.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/requirements.txt +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/run.sh +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/{{ cookiecutter.app_name }}/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/{{ cookiecutter.app_name }}/agent.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/ve_faas_utils.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/clean.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/config.yaml.example +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/Dockerfile +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/app.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/init_db.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/models.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/requirements.txt +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/run.sh +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/static/css/style.css +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/static/js/admin.js +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/templates/admin/dashboard.html +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/templates/admin/edit_post.html +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/templates/admin/login.html +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/templates/admin/posts.html +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/templates/base.html +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/templates/index.html +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/templates/post.html +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_identity/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_identity/auth_config.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_identity/auth_mixins.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_identity/auth_processor.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_identity/function_tool.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_identity/mcp_tool.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_identity/mcp_toolset.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_identity/utils.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_prompt_pilot/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_prompt_pilot/ve_prompt_pilot.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_tls/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_tls/utils.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_tls/ve_tls.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_tos/ve_tos.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/integrations/ve_viking_db_memory/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/knowledgebase/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/knowledgebase/backends/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/knowledgebase/backends/base_backend.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/knowledgebase/backends/in_memory_backend.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/knowledgebase/backends/opensearch_backend.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/knowledgebase/backends/utils.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/knowledgebase/entry.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/memory/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/memory/long_term_memory.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/memory/long_term_memory_backends/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/memory/long_term_memory_backends/base_backend.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/memory/long_term_memory_backends/in_memory_backend.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/memory/long_term_memory_backends/mem0_backend.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/memory/long_term_memory_backends/opensearch_backend.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/memory/long_term_memory_backends/redis_backend.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/memory/long_term_memory_backends/vikingdb_memory_backend.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/memory/short_term_memory_backends/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/memory/short_term_memory_backends/base_backend.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/memory/short_term_memory_backends/sqlite_backend.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/memory/short_term_memory_processor.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/processors/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/processors/base_run_processor.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/prompts/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/prompts/agent_default_prompt.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/prompts/prompt_evaluator.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/prompts/prompt_memory_processor.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/prompts/prompt_optimization.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tools/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tools/builtin_tools/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tools/builtin_tools/generate_image.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tools/builtin_tools/image_edit.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tools/builtin_tools/image_generate.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tools/builtin_tools/lark.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tools/builtin_tools/las.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tools/builtin_tools/link_reader.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tools/builtin_tools/llm_shield.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tools/builtin_tools/load_knowledgebase.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tools/builtin_tools/mcp_router.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tools/builtin_tools/tts.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tools/builtin_tools/vesearch.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tools/builtin_tools/web_scraper.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tools/builtin_tools/web_search.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tools/demo_tools.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tools/load_knowledgebase_tool.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tools/sandbox/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tools/sandbox/browser_sandbox.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tools/sandbox/code_sandbox.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tools/sandbox/computer_sandbox.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tracing/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tracing/base_tracer.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tracing/telemetry/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tracing/telemetry/attributes/attributes.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tracing/telemetry/attributes/extractors/common_attributes_extractors.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tracing/telemetry/attributes/extractors/llm_attributes_extractors.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tracing/telemetry/attributes/extractors/tool_attributes_extractors.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tracing/telemetry/attributes/extractors/types.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tracing/telemetry/exporters/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tracing/telemetry/exporters/apmplus_exporter.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tracing/telemetry/exporters/base_exporter.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tracing/telemetry/exporters/cozeloop_exporter.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tracing/telemetry/exporters/inmemory_exporter.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tracing/telemetry/exporters/tls_exporter.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tracing/telemetry/opentelemetry_tracer.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/tracing/telemetry/telemetry.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/types.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/utils/__init__.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/utils/audio_manager.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/utils/logger.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/utils/mcp_utils.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/utils/misc.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/utils/patches.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk/utils/volcengine_sign.py +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk_python.egg-info/dependency_links.txt +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk_python.egg-info/entry_points.txt +0 -0
- {veadk_python-0.2.21 → veadk_python-0.2.23}/veadk_python.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: veadk-python
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.23
|
|
4
4
|
Summary: Volcengine agent development kit, integrations with Volcengine cloud services.
|
|
5
5
|
Author-email: Yaozheng Fang <fangyozheng@gmail.com>, Guodong Li <cu.eric.lee@gmail.com>, Zhi Han <sliverydayday@gmail.com>, Meng Wang <mengwangwm@gmail.com>
|
|
6
6
|
License: Apache License
|
|
@@ -218,7 +218,7 @@ Requires-Dist: opentelemetry-exporter-otlp>=1.35.0
|
|
|
218
218
|
Requires-Dist: opentelemetry-instrumentation-logging>=0.56b0
|
|
219
219
|
Requires-Dist: wrapt>=1.17.2
|
|
220
220
|
Requires-Dist: openai<1.100
|
|
221
|
-
Requires-Dist: volcengine-python-sdk>=4.0.
|
|
221
|
+
Requires-Dist: volcengine-python-sdk>=4.0.33
|
|
222
222
|
Requires-Dist: volcengine>=1.0.193
|
|
223
223
|
Requires-Dist: agent-pilot-sdk>=0.1.2
|
|
224
224
|
Requires-Dist: fastmcp>=2.11.3
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "veadk-python"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.23"
|
|
4
4
|
description = "Volcengine agent development kit, integrations with Volcengine cloud services."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
@@ -22,7 +22,7 @@ dependencies = [
|
|
|
22
22
|
"opentelemetry-instrumentation-logging>=0.56b0",
|
|
23
23
|
"wrapt>=1.17.2", # For patching built-in functions
|
|
24
24
|
"openai<1.100", # For fix https://github.com/BerriAI/litellm/issues/13710
|
|
25
|
-
"volcengine-python-sdk>=4.0.
|
|
25
|
+
"volcengine-python-sdk>=4.0.33", # For Volcengine API
|
|
26
26
|
"volcengine>=1.0.193", # For Volcengine sign
|
|
27
27
|
"agent-pilot-sdk>=0.1.2", # Prompt optimization by Volcengine AgentPilot/PromptPilot toolkits
|
|
28
28
|
"fastmcp>=2.11.3", # For running MCP
|
|
@@ -61,6 +61,12 @@ async def test_cloud():
|
|
|
61
61
|
mock_vefaas_service.find_app_id_by_name.return_value = "app-123"
|
|
62
62
|
mock_vefaas_service.delete.return_value = None
|
|
63
63
|
|
|
64
|
+
mock_vefaas_service.get_application_route.return_value = (
|
|
65
|
+
"gw-123",
|
|
66
|
+
"svc-456",
|
|
67
|
+
"route-789",
|
|
68
|
+
)
|
|
69
|
+
|
|
64
70
|
# Test CloudAgentEngine creation and deploy functionality
|
|
65
71
|
engine = CloudAgentEngine()
|
|
66
72
|
|
|
@@ -0,0 +1,198 @@
|
|
|
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
|
+
import json
|
|
16
|
+
from typing import Literal, Optional
|
|
17
|
+
|
|
18
|
+
import httpx
|
|
19
|
+
import requests
|
|
20
|
+
from a2a.types import AgentCard
|
|
21
|
+
from google.adk.agents.remote_a2a_agent import RemoteA2aAgent
|
|
22
|
+
|
|
23
|
+
from veadk.utils.logger import get_logger
|
|
24
|
+
|
|
25
|
+
logger = get_logger(__name__)
|
|
26
|
+
|
|
27
|
+
AGENT_CARD_WELL_KNOWN_PATH = "/.well-known/agent-card.json"
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def _convert_agent_card_dict_to_obj(agent_card_dict: dict) -> AgentCard:
|
|
31
|
+
agent_card_json_str = json.dumps(agent_card_dict, ensure_ascii=False, indent=2)
|
|
32
|
+
agent_card_object = AgentCard.model_validate_json(str(agent_card_json_str))
|
|
33
|
+
return agent_card_object
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class RemoteVeAgent(RemoteA2aAgent):
|
|
37
|
+
"""Connect to a remote agent on the VeFaaS platform.
|
|
38
|
+
|
|
39
|
+
This class provides an interface to remotely connect with an agent deployed on the
|
|
40
|
+
VeFaaS platform. It automatically fetches the agent card (metadata) and configures
|
|
41
|
+
an HTTP client for secure communication.
|
|
42
|
+
|
|
43
|
+
The class extends `RemoteA2aAgent` to provide compatibility with the A2A
|
|
44
|
+
(Agent-to-Agent) communication layer.
|
|
45
|
+
|
|
46
|
+
This constructor handles agent discovery and HTTP client setup. It determines the
|
|
47
|
+
agent's URL, fetches its metadata (`agent_card`), and prepares an
|
|
48
|
+
`httpx.AsyncClient` for subsequent communication. You can either provide a URL
|
|
49
|
+
directly, or pass a pre-configured `httpx.AsyncClient` with a `base_url`.
|
|
50
|
+
|
|
51
|
+
Authentication can be handled via a bearer token in the HTTP header or via a
|
|
52
|
+
query string parameter. If a custom `httpx_client` is provided, authentication
|
|
53
|
+
details will be added to it.
|
|
54
|
+
|
|
55
|
+
Attributes:
|
|
56
|
+
name (str):
|
|
57
|
+
A unique name identifying this remote agent instance.
|
|
58
|
+
url (Optional[str]):
|
|
59
|
+
The base URL of the remote agent. This is optional if an `httpx_client`
|
|
60
|
+
with a configured `base_url` is provided. If both are given, they must
|
|
61
|
+
not conflict.
|
|
62
|
+
auth_token (Optional[str]):
|
|
63
|
+
Optional authentication token used for secure access. If not provided,
|
|
64
|
+
the agent will be accessed without authentication.
|
|
65
|
+
auth_method (Literal["header", "querystring"] | None):
|
|
66
|
+
The method of attaching the authentication token.
|
|
67
|
+
- `"header"`: Token is passed via HTTP `Authorization` header.
|
|
68
|
+
- `"querystring"`: Token is passed as a query parameter.
|
|
69
|
+
httpx_client (Optional[httpx.AsyncClient]):
|
|
70
|
+
An optional, pre-configured `httpx.AsyncClient` to use for communication.
|
|
71
|
+
This allows for client sharing and advanced configurations (e.g., proxies).
|
|
72
|
+
If its `base_url` is set, it will be used as the agent's location.
|
|
73
|
+
|
|
74
|
+
Raises:
|
|
75
|
+
ValueError:
|
|
76
|
+
- If `url` and `httpx_client.base_url` are both provided and conflict.
|
|
77
|
+
- If neither `url` nor an `httpx_client` with a `base_url` is provided.
|
|
78
|
+
- If an unsupported `auth_method` is provided when `auth_token` is set.
|
|
79
|
+
requests.RequestException:
|
|
80
|
+
If fetching the agent card from the remote URL fails.
|
|
81
|
+
|
|
82
|
+
Examples:
|
|
83
|
+
```python
|
|
84
|
+
# Example 1: Connect using a URL
|
|
85
|
+
agent = RemoteVeAgent(
|
|
86
|
+
name="public_agent",
|
|
87
|
+
url="https://vefaas.example.com/agents/public"
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
# Example 2: Using Bearer token in header
|
|
91
|
+
agent = RemoteVeAgent(
|
|
92
|
+
name="secured_agent",
|
|
93
|
+
url="https://vefaas.example.com/agents/secure",
|
|
94
|
+
auth_token="my_secret_token",
|
|
95
|
+
auth_method="header"
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
# Example 3: Using a pre-configured httpx_client
|
|
99
|
+
import httpx
|
|
100
|
+
client = httpx.AsyncClient(
|
|
101
|
+
base_url="https://vefaas.example.com/agents/query",
|
|
102
|
+
timeout=600
|
|
103
|
+
)
|
|
104
|
+
agent = RemoteVeAgent(
|
|
105
|
+
name="query_agent",
|
|
106
|
+
auth_token="my_secret_token",
|
|
107
|
+
auth_method="querystring",
|
|
108
|
+
httpx_client=client
|
|
109
|
+
)
|
|
110
|
+
```
|
|
111
|
+
"""
|
|
112
|
+
|
|
113
|
+
def __init__(
|
|
114
|
+
self,
|
|
115
|
+
name: str,
|
|
116
|
+
url: Optional[str] = None,
|
|
117
|
+
auth_token: Optional[str] = None,
|
|
118
|
+
auth_method: Literal["header", "querystring"] | None = None,
|
|
119
|
+
httpx_client: Optional[httpx.AsyncClient] = None,
|
|
120
|
+
):
|
|
121
|
+
# Determine the effective URL for the agent and handle conflicts.
|
|
122
|
+
effective_url = url
|
|
123
|
+
if httpx_client and httpx_client.base_url:
|
|
124
|
+
client_url_str = str(httpx_client.base_url).rstrip("/")
|
|
125
|
+
if url and url.rstrip("/") != client_url_str:
|
|
126
|
+
raise ValueError(
|
|
127
|
+
f"The `url` parameter ('{url}') conflicts with the `base_url` of the provided "
|
|
128
|
+
f"httpx_client ('{client_url_str}'). Please provide only one or ensure they match."
|
|
129
|
+
)
|
|
130
|
+
effective_url = client_url_str
|
|
131
|
+
|
|
132
|
+
if not effective_url:
|
|
133
|
+
raise ValueError(
|
|
134
|
+
"Could not determine agent URL. Please provide the `url` parameter or an `httpx_client` with a configured `base_url`."
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
req_headers = {}
|
|
138
|
+
req_params = {}
|
|
139
|
+
|
|
140
|
+
if auth_token:
|
|
141
|
+
if auth_method == "header":
|
|
142
|
+
req_headers = {"Authorization": f"Bearer {auth_token}"}
|
|
143
|
+
elif auth_method == "querystring":
|
|
144
|
+
req_params = {"token": auth_token}
|
|
145
|
+
elif auth_method:
|
|
146
|
+
raise ValueError(
|
|
147
|
+
f"Unsupported auth method {auth_method}, use `header` or `querystring` instead."
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
agent_card_dict = requests.get(
|
|
151
|
+
effective_url + AGENT_CARD_WELL_KNOWN_PATH,
|
|
152
|
+
headers=req_headers,
|
|
153
|
+
params=req_params,
|
|
154
|
+
).json()
|
|
155
|
+
# replace agent_card_url with actual host
|
|
156
|
+
agent_card_dict["url"] = effective_url
|
|
157
|
+
|
|
158
|
+
agent_card_object = _convert_agent_card_dict_to_obj(agent_card_dict)
|
|
159
|
+
|
|
160
|
+
logger.debug(f"Agent card of {name}: {agent_card_object}")
|
|
161
|
+
|
|
162
|
+
client_was_provided = httpx_client is not None
|
|
163
|
+
client_to_use = httpx_client
|
|
164
|
+
|
|
165
|
+
if client_was_provided:
|
|
166
|
+
# If a client was provided, update it with auth info
|
|
167
|
+
if auth_token:
|
|
168
|
+
if auth_method == "header":
|
|
169
|
+
client_to_use.headers.update(req_headers)
|
|
170
|
+
elif auth_method == "querystring":
|
|
171
|
+
new_params = dict(client_to_use.params)
|
|
172
|
+
new_params.update(req_params)
|
|
173
|
+
client_to_use.params = new_params
|
|
174
|
+
else:
|
|
175
|
+
# If no client was provided, create a new one with auth info
|
|
176
|
+
if auth_token:
|
|
177
|
+
if auth_method == "header":
|
|
178
|
+
client_to_use = httpx.AsyncClient(
|
|
179
|
+
base_url=effective_url, headers=req_headers, timeout=600
|
|
180
|
+
)
|
|
181
|
+
elif auth_method == "querystring":
|
|
182
|
+
client_to_use = httpx.AsyncClient(
|
|
183
|
+
base_url=effective_url, params=req_params, timeout=600
|
|
184
|
+
)
|
|
185
|
+
else: # No auth, no client provided
|
|
186
|
+
client_to_use = httpx.AsyncClient(base_url=effective_url, timeout=600)
|
|
187
|
+
|
|
188
|
+
super().__init__(
|
|
189
|
+
name=name, agent_card=agent_card_object, httpx_client=client_to_use
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
# The parent class sets _httpx_client_needs_cleanup based on whether
|
|
193
|
+
# the httpx_client it received was None. Since we always pass a
|
|
194
|
+
# client (either the user's or one we create), it will always set
|
|
195
|
+
# it to False. We must override this to ensure clients we create
|
|
196
|
+
# are properly cleaned up.
|
|
197
|
+
if not client_was_provided:
|
|
198
|
+
self._httpx_client_needs_cleanup = True
|
|
@@ -123,6 +123,8 @@ class Agent(LlmAgent):
|
|
|
123
123
|
)
|
|
124
124
|
"""
|
|
125
125
|
|
|
126
|
+
enable_authz: bool = False
|
|
127
|
+
|
|
126
128
|
def model_post_init(self, __context: Any) -> None:
|
|
127
129
|
super().model_post_init(None) # for sub_agents init
|
|
128
130
|
|
|
@@ -184,6 +186,22 @@ class Agent(LlmAgent):
|
|
|
184
186
|
load_memory.custom_metadata["backend"] = self.long_term_memory.backend
|
|
185
187
|
self.tools.append(load_memory)
|
|
186
188
|
|
|
189
|
+
if self.enable_authz:
|
|
190
|
+
from veadk.tools.builtin_tools.agent_authorization import (
|
|
191
|
+
check_agent_authorization,
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
if self.before_agent_callback:
|
|
195
|
+
if isinstance(self.before_agent_callback, list):
|
|
196
|
+
self.before_agent_callback.append(check_agent_authorization)
|
|
197
|
+
else:
|
|
198
|
+
self.before_agent_callback = [
|
|
199
|
+
self.before_agent_callback,
|
|
200
|
+
check_agent_authorization,
|
|
201
|
+
]
|
|
202
|
+
else:
|
|
203
|
+
self.before_agent_callback = check_agent_authorization
|
|
204
|
+
|
|
187
205
|
logger.info(f"VeADK version: {VERSION}")
|
|
188
206
|
|
|
189
207
|
logger.info(f"{self.__class__.__name__} `{self.name}` init done.")
|
|
@@ -24,7 +24,7 @@ logger = get_logger(__name__)
|
|
|
24
24
|
|
|
25
25
|
@click.command()
|
|
26
26
|
@click.option(
|
|
27
|
-
"--vefaas-
|
|
27
|
+
"--vefaas-app-name",
|
|
28
28
|
required=True,
|
|
29
29
|
help="VeFaaS application name to clean",
|
|
30
30
|
)
|
|
@@ -39,7 +39,7 @@ logger = get_logger(__name__)
|
|
|
39
39
|
help="Volcengine secret key, if not set, will use the value of environment variable VOLCENGINE_SECRET_KEY",
|
|
40
40
|
)
|
|
41
41
|
def clean(
|
|
42
|
-
|
|
42
|
+
vefaas_app_name: str, volcengine_access_key: str, volcengine_secret_key: str
|
|
43
43
|
) -> None:
|
|
44
44
|
"""
|
|
45
45
|
Clean and delete a VeFaaS application from the cloud.
|
|
@@ -49,7 +49,7 @@ def clean(
|
|
|
49
49
|
and monitor the deletion process until completion.
|
|
50
50
|
|
|
51
51
|
Args:
|
|
52
|
-
|
|
52
|
+
vefaas_app_name (str): The name of the VeFaaS application to delete
|
|
53
53
|
volcengine_access_key (str): Volcengine access key for authentication.
|
|
54
54
|
If None, will use VOLCENGINE_ACCESS_KEY environment variable
|
|
55
55
|
volcengine_secret_key (str): Volcengine secret key for authentication.
|
|
@@ -63,7 +63,7 @@ def clean(
|
|
|
63
63
|
if not volcengine_secret_key:
|
|
64
64
|
volcengine_secret_key = getenv("VOLCENGINE_SECRET_KEY")
|
|
65
65
|
|
|
66
|
-
confirm = input(f"Confirm delete cloud app {
|
|
66
|
+
confirm = input(f"Confirm delete cloud app {vefaas_app_name}? (y/N): ")
|
|
67
67
|
if confirm.lower() != "y":
|
|
68
68
|
click.echo("Delete cancelled.")
|
|
69
69
|
return
|
|
@@ -71,16 +71,14 @@ def clean(
|
|
|
71
71
|
vefaas_client = VeFaaS(
|
|
72
72
|
access_key=volcengine_access_key, secret_key=volcengine_secret_key
|
|
73
73
|
)
|
|
74
|
-
vefaas_application_id = vefaas_client.find_app_id_by_name(
|
|
75
|
-
vefaas_application_name
|
|
76
|
-
)
|
|
74
|
+
vefaas_application_id = vefaas_client.find_app_id_by_name(vefaas_app_name)
|
|
77
75
|
vefaas_client.delete(vefaas_application_id)
|
|
78
76
|
click.echo(
|
|
79
|
-
f"Cloud app {
|
|
77
|
+
f"Cloud app {vefaas_app_name} delete request has been sent to VeFaaS"
|
|
80
78
|
)
|
|
81
79
|
while True:
|
|
82
80
|
try:
|
|
83
|
-
id = vefaas_client.find_app_id_by_name(
|
|
81
|
+
id = vefaas_client.find_app_id_by_name(vefaas_app_name)
|
|
84
82
|
if not id:
|
|
85
83
|
break
|
|
86
84
|
time.sleep(3)
|
|
@@ -22,12 +22,12 @@ TEMP_PATH = "/tmp"
|
|
|
22
22
|
|
|
23
23
|
@click.command()
|
|
24
24
|
@click.option(
|
|
25
|
-
"--access-key",
|
|
25
|
+
"--volcengine-access-key",
|
|
26
26
|
default=None,
|
|
27
27
|
help="Volcengine access key",
|
|
28
28
|
)
|
|
29
29
|
@click.option(
|
|
30
|
-
"--secret-key",
|
|
30
|
+
"--volcengine-secret-key",
|
|
31
31
|
default=None,
|
|
32
32
|
help="Volcengine secret key",
|
|
33
33
|
)
|
|
@@ -50,16 +50,35 @@ TEMP_PATH = "/tmp"
|
|
|
50
50
|
help="Backend for short-term memory",
|
|
51
51
|
)
|
|
52
52
|
@click.option("--use-adk-web", is_flag=True, help="Whether to use ADK Web")
|
|
53
|
+
@click.option(
|
|
54
|
+
"--auth-method",
|
|
55
|
+
default="none",
|
|
56
|
+
type=click.Choice(["none", "api-key", "oauth2"]),
|
|
57
|
+
help="=Authentication method for agent",
|
|
58
|
+
)
|
|
59
|
+
@click.option(
|
|
60
|
+
"--user-pool-name",
|
|
61
|
+
default="",
|
|
62
|
+
help="Expected Volcengine Identity user pool name",
|
|
63
|
+
)
|
|
64
|
+
@click.option(
|
|
65
|
+
"--client-name",
|
|
66
|
+
default="",
|
|
67
|
+
help="Expected Volcengine Identity client name",
|
|
68
|
+
)
|
|
53
69
|
@click.option("--path", default=".", help="Local project path")
|
|
54
70
|
def deploy(
|
|
55
|
-
|
|
56
|
-
|
|
71
|
+
volcengine_access_key: str,
|
|
72
|
+
volcengine_secret_key: str,
|
|
57
73
|
vefaas_app_name: str,
|
|
58
74
|
veapig_instance_name: str,
|
|
59
75
|
veapig_service_name: str,
|
|
60
76
|
veapig_upstream_name: str,
|
|
61
77
|
short_term_memory_backend: str,
|
|
62
78
|
use_adk_web: bool,
|
|
79
|
+
auth_method: str,
|
|
80
|
+
user_pool_name: str,
|
|
81
|
+
client_name: str,
|
|
63
82
|
path: str,
|
|
64
83
|
) -> None:
|
|
65
84
|
"""Deploy a user project to Volcengine FaaS application.
|
|
@@ -77,9 +96,9 @@ def deploy(
|
|
|
77
96
|
5. Cleaning up temporary files
|
|
78
97
|
|
|
79
98
|
Args:
|
|
80
|
-
|
|
99
|
+
volcengine_access_key: Volcengine access key for API authentication. If not provided,
|
|
81
100
|
will use VOLCENGINE_ACCESS_KEY environment variable
|
|
82
|
-
|
|
101
|
+
volcengine_secret_key: Volcengine secret key for API authentication. If not provided,
|
|
83
102
|
will use VOLCENGINE_SECRET_KEY environment variable
|
|
84
103
|
vefaas_app_name: Name of the target Volcengine FaaS application where the
|
|
85
104
|
project will be deployed
|
|
@@ -90,6 +109,10 @@ def deploy(
|
|
|
90
109
|
short_term_memory_backend: Backend type for short-term memory storage.
|
|
91
110
|
Choices are 'local' or 'mysql'
|
|
92
111
|
use_adk_web: Flag to enable ADK Web interface for the deployed agent
|
|
112
|
+
auth_method: Authentication for the agent.
|
|
113
|
+
Choices are 'none', 'api-key' or 'oauth2'.
|
|
114
|
+
veidentity_user_pool_name: Optional Volcengine Identity user pool name
|
|
115
|
+
veidentity_client_name: Optional Volcengine Identity client name
|
|
93
116
|
path: Local directory path containing the VeADK project to deploy
|
|
94
117
|
|
|
95
118
|
Note:
|
|
@@ -111,10 +134,10 @@ def deploy(
|
|
|
111
134
|
|
|
112
135
|
logger = get_logger(__name__)
|
|
113
136
|
|
|
114
|
-
if not
|
|
115
|
-
|
|
116
|
-
if not
|
|
117
|
-
|
|
137
|
+
if not volcengine_access_key:
|
|
138
|
+
volcengine_access_key = getenv("VOLCENGINE_ACCESS_KEY")
|
|
139
|
+
if not volcengine_secret_key:
|
|
140
|
+
volcengine_secret_key = getenv("VOLCENGINE_SECRET_KEY")
|
|
118
141
|
|
|
119
142
|
user_proj_abs_path = Path(path).resolve()
|
|
120
143
|
template_dir_path = Path(vefaas.__file__).parent / "template"
|
|
@@ -131,6 +154,9 @@ def deploy(
|
|
|
131
154
|
"veapig_service_name": veapig_service_name,
|
|
132
155
|
"veapig_upstream_name": veapig_upstream_name,
|
|
133
156
|
"use_adk_web": use_adk_web,
|
|
157
|
+
"auth_method": auth_method,
|
|
158
|
+
"veidentity_user_pool_name": user_pool_name,
|
|
159
|
+
"veidentity_client_name": client_name,
|
|
134
160
|
"veadk_version": VERSION,
|
|
135
161
|
}
|
|
136
162
|
|
|
@@ -61,13 +61,49 @@ def _render_prompts() -> dict[str, Any]:
|
|
|
61
61
|
deploy_mode = click.prompt(
|
|
62
62
|
"Enter your choice", type=click.Choice(deploy_mode_options.keys())
|
|
63
63
|
)
|
|
64
|
+
use_adk_web = deploy_mode == "2"
|
|
65
|
+
|
|
66
|
+
auth_method_options = {
|
|
67
|
+
"1": "None",
|
|
68
|
+
"2": "API key",
|
|
69
|
+
"3": "OAuth2",
|
|
70
|
+
}
|
|
71
|
+
auth_methods = {
|
|
72
|
+
"1": "none",
|
|
73
|
+
"2": "api-key",
|
|
74
|
+
"3": "oauth2",
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
click.echo("Choose an authentication method:")
|
|
78
|
+
for key, value in auth_method_options.items():
|
|
79
|
+
click.echo(f" {key}. {value}")
|
|
80
|
+
|
|
81
|
+
auth_method_idx = click.prompt(
|
|
82
|
+
"Enter your choice", type=click.Choice(auth_method_options.keys())
|
|
83
|
+
)
|
|
84
|
+
auth_method = auth_methods[auth_method_idx]
|
|
85
|
+
|
|
86
|
+
veidentity_user_pool_name = ""
|
|
87
|
+
veidentity_client_name = ""
|
|
88
|
+
if auth_method == "oauth2":
|
|
89
|
+
veidentity_user_pool_name = click.prompt(
|
|
90
|
+
"Volcengine Identity user pool name", default="", show_default=True
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
if use_adk_web:
|
|
94
|
+
veidentity_client_name = click.prompt(
|
|
95
|
+
"Volcengine Identity client name", default="", show_default=True
|
|
96
|
+
)
|
|
64
97
|
|
|
65
98
|
return {
|
|
66
99
|
"vefaas_application_name": vefaas_application_name,
|
|
67
100
|
"veapig_instance_name": veapig_instance_name,
|
|
68
101
|
"veapig_service_name": veapig_service_name,
|
|
69
102
|
"veapig_upstream_name": veapig_upstream_name,
|
|
70
|
-
"use_adk_web":
|
|
103
|
+
"use_adk_web": use_adk_web,
|
|
104
|
+
"auth_method": auth_method,
|
|
105
|
+
"veidentity_user_pool_name": veidentity_user_pool_name,
|
|
106
|
+
"veidentity_client_name": veidentity_client_name,
|
|
71
107
|
"veadk_version": VERSION,
|
|
72
108
|
}
|
|
73
109
|
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
15
|
import click
|
|
16
|
-
import os
|
|
17
16
|
|
|
18
17
|
from veadk.cloud.cloud_agent_engine import CloudAgentEngine
|
|
19
18
|
from veadk.utils.logger import get_logger
|
|
19
|
+
from veadk.config import getenv
|
|
20
20
|
|
|
21
21
|
logger = get_logger(__name__)
|
|
22
22
|
|
|
@@ -33,7 +33,7 @@ logger = get_logger(__name__)
|
|
|
33
33
|
help="Volcengine secret key for authentication. Defaults to VOLCENGINE_SECRET_KEY environment variable.",
|
|
34
34
|
)
|
|
35
35
|
@click.option(
|
|
36
|
-
"--
|
|
36
|
+
"--vefaas-app-name",
|
|
37
37
|
required=True,
|
|
38
38
|
help="Name of the cloud application to update.",
|
|
39
39
|
)
|
|
@@ -45,7 +45,7 @@ logger = get_logger(__name__)
|
|
|
45
45
|
def update(
|
|
46
46
|
volcengine_access_key: str,
|
|
47
47
|
volcengine_secret_key: str,
|
|
48
|
-
|
|
48
|
+
vefaas_app_name: str,
|
|
49
49
|
path: str,
|
|
50
50
|
) -> None:
|
|
51
51
|
"""Update function code of a deployed cloud application on Volcengine FaaS.
|
|
@@ -65,7 +65,7 @@ def update(
|
|
|
65
65
|
If not provided, uses VOLCENGINE_ACCESS_KEY environment variable.
|
|
66
66
|
volcengine_secret_key: Volcengine platform secret key for authentication.
|
|
67
67
|
If not provided, uses VOLCENGINE_SECRET_KEY environment variable.
|
|
68
|
-
|
|
68
|
+
vefaas_app_name: Name of the existing cloud application to update.
|
|
69
69
|
path: Local directory path containing the updated agent project.
|
|
70
70
|
Defaults to current directory if not specified.
|
|
71
71
|
|
|
@@ -79,22 +79,25 @@ def update(
|
|
|
79
79
|
FileNotFoundError: If local path does not exist.
|
|
80
80
|
"""
|
|
81
81
|
# Set environment variables if provided
|
|
82
|
-
if
|
|
83
|
-
|
|
84
|
-
if
|
|
85
|
-
|
|
82
|
+
if not volcengine_access_key:
|
|
83
|
+
volcengine_access_key = getenv("VOLCENGINE_ACCESS_KEY")
|
|
84
|
+
if not volcengine_secret_key:
|
|
85
|
+
volcengine_secret_key = getenv("VOLCENGINE_SECRET_KEY")
|
|
86
86
|
|
|
87
87
|
# Initialize cloud agent engine
|
|
88
|
-
engine = CloudAgentEngine(
|
|
88
|
+
engine = CloudAgentEngine(
|
|
89
|
+
volcengine_access_key=volcengine_access_key,
|
|
90
|
+
volcengine_secret_key=volcengine_secret_key,
|
|
91
|
+
)
|
|
89
92
|
|
|
90
93
|
try:
|
|
91
94
|
# Update function code
|
|
92
95
|
updated_app = engine.update_function_code(
|
|
93
|
-
application_name=
|
|
96
|
+
application_name=vefaas_app_name,
|
|
94
97
|
path=path,
|
|
95
98
|
)
|
|
96
99
|
|
|
97
|
-
logger.info(f"Successfully updated cloud application '{
|
|
100
|
+
logger.info(f"Successfully updated cloud application '{vefaas_app_name}'")
|
|
98
101
|
logger.info(f"Endpoint: {updated_app.vefaas_endpoint}")
|
|
99
102
|
logger.info(f"Application ID: {updated_app.vefaas_application_id}")
|
|
100
103
|
|