sycommon-python-lib 0.2.7a27__tar.gz → 0.2.7a29__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.
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/PKG-INFO +6 -6
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/pyproject.toml +6 -6
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/agent/deep_agent.py +6 -5
- sycommon_python_lib-0.2.7a29/src/sycommon/agent/mcp/tool_loader.py +449 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/agent/sandbox/minio_sync.py +35 -17
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon_python_lib.egg-info/PKG-INFO +6 -6
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon_python_lib.egg-info/requires.txt +5 -5
- sycommon_python_lib-0.2.7a27/src/sycommon/agent/mcp/tool_loader.py +0 -275
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/README.md +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/setup.cfg +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/cli.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/core/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/core/console.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/core/models.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/core/project.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/core/utils.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/agent/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/agent/agent/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/agent/agent/main_agent.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/agent/agent/nodes/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/agent/agent/nodes/example_node.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/agent/agent/states/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/agent/agent/states/agent_state.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/agent/api/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/agent/api/query.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/agent/api/sse/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/agent/api/sse/agent.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/agent/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/agent/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/agent/db/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/agent/db/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/agent/db/model/entity.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/agent/db/service.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/agent/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/agent/model/parse.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/agent/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/agent/tools/mq.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/base/.env.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/base/.gitignore.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/base/Dockerfile.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/base/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/base/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/base/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/base/app.yaml.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/base/client/FileServiceClient.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/base/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/base/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/base/model/file_info.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/base/requirements.txt.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/cli/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/cli/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/cli/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/cli/commands/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/cli/commands/hello.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/cli/pyproject.toml.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/cli/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/web/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/web/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/web/api/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/web/api/echo.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/web/api/sse/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/web/api/sse/echo.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/web/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/web/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/web/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/web/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/command/templates/web/tools/mq.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/nexus/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/__main__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/acp/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/acp/config.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/acp/executor.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/acp/registry.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/acp/server.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/agents/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/agents/factory.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/agents/prompts.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/cdp/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/cdp/browser.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/cdp/capabilities/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/cdp/capabilities/console.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/cdp/capabilities/dom.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/cdp/capabilities/network.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/cdp/capabilities/page_errors.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/cdp/capabilities/performance.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/cdp/capabilities/screenshot.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/cdp/client.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/cdp/protocol.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/cdp/repl.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/cli.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/commands/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/commands/acp_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/commands/cdp_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/commands/chat_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/commands/create_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/commands/evaluate_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/commands/init_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/commands/memory_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/commands/resume_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/commands/rollback_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/commands/run_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/core/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/core/backend.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/core/config.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/core/display.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/core/git_integration.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/core/llm.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/core/state.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/evaluate/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/evaluate/api_evaluator.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/memory/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/memory/compressor.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/memory/full.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/memory/hot.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/memory/manager.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/memory/warm.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/mode/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/mode/create.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/mode/optimize.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/models/config_models.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/rl/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/rl/baseline_tests.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/rl/checkpoint.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/rl/convergence.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/rl/diagnosis.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/rl/engine.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/rl/environment.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/rl/experience.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/rl/harness_prompts.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/rl/history.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/rl/optimization_logger.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/rl/pre_validation.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/rl/reward.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/rl/strategy_bandit.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/rl/strategy_generator.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/rl/strategy_prompts.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/simple_chat_agent.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycli/skills/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/agent/acp/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/agent/acp/client.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/agent/acp/fetch.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/agent/acp/ssh_init.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/agent/acp/tool.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/agent/agent_manager.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/agent/chat_events.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/agent/mcp/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/agent/mcp/models.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/agent/middleware/sandbox_path_guard.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/agent/middleware/sensitive_guard.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/agent/middleware/sitecustomize.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/agent/middleware/skill_api_whitelist.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/agent/middleware/skill_wl_check.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/agent/middleware/skill_write_guard.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/agent/multi_agent_team.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/agent/sandbox/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/agent/sandbox/consistent_hash.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/agent/sandbox/file_ops.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/agent/sandbox/http_sandbox_backend.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/agent/sandbox/sandbox_pool.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/agent/sandbox/sandbox_recovery.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/agent/sandbox/session.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/agent/summarization_utils.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/auth/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/auth/ldap_service.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/auth/oa_cache.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/auth/oa_crypto.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/auth/oa_service.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/auth/wecom_ldap_service.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/config/ACPAgentConfig.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/config/Config.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/config/DatabaseConfig.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/config/ElasticsearchConfig.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/config/EmbeddingConfig.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/config/LLMConfig.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/config/LangfuseConfig.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/config/MQConfig.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/config/PgConfig.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/config/RedisConfig.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/config/RerankerConfig.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/config/SentryConfig.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/config/SkillApiWhitelistConfig.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/config/XxlJobConfig.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/config/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/config/config_change_notifier.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/database/async_base_db_service.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/database/async_database_service.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/database/base_db_service.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/database/database_service.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/database/elasticsearch_service.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/database/pg_checkpoint_service.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/database/redis_service.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/database/resilient_pg_saver.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/database/token_usage_db_service.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/health/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/health/health_check.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/health/metrics.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/health/ping.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/heartbeat_process/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/heartbeat_process/heartbeat_config.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/heartbeat_process/heartbeat_process_manager.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/heartbeat_process/heartbeat_process_worker.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/llm/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/llm/embedding.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/llm/get_llm.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/llm/llm_logger.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/llm/llm_tokens.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/llm/llm_with_token_tracking.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/llm/native_with_fallback_runnable.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/llm/output_fixing_runnable.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/llm/struct_token.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/llm/sy_langfuse.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/llm/tiktoken_cache/9b5ad71b2ce5302211f9c61530b329a4922fc6a4 +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/llm/tiktoken_cache/fb374d419588a4632f3f557e76b4b70aebbca790 +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/llm/token_usage_es_service.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/llm/token_usage_mysql_service.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/llm/token_utils.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/llm/usage_token.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/logging/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/logging/async_sql_logger.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/logging/kafka_log.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/logging/log_masker.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/logging/logger_levels.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/logging/logger_wrapper.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/logging/process_logger.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/logging/sql_logger.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/mcp_server/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/mcp_server/server.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/middleware/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/middleware/context.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/middleware/cors.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/middleware/docs.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/middleware/exception.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/middleware/middleware.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/middleware/monitor_memory.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/middleware/mq.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/middleware/sandbox.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/middleware/timeout.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/middleware/token_tracking.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/middleware/tool_result_truncation.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/middleware/traceid.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/models/base_http.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/models/log.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/models/mcp_server_config.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/models/mqlistener_config.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/models/mqmsg_model.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/models/mqsend_config.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/models/sandbox.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/models/sso_user.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/models/token_usage.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/models/token_usage_mysql.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/models/xxljob_handler_config.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/notice/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/notice/uvicorn_monitor.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/notice/wecom_message.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/rabbitmq/process_pool_consumer.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/rabbitmq/rabbitmq_client.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/rabbitmq/rabbitmq_pool.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/rabbitmq/rabbitmq_service.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/rabbitmq/rabbitmq_service_client_manager.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/rabbitmq/rabbitmq_service_connection_monitor.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/rabbitmq/rabbitmq_service_consumer_manager.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/rabbitmq/rabbitmq_service_core.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/rabbitmq/rabbitmq_service_producer_manager.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/sentry/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/sentry/sy_sentry.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/services.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/sse/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/sse/event.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/sse/sse.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/synacos/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/synacos/example.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/synacos/example2.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/synacos/feign.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/synacos/feign_client.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/synacos/nacos_client_base.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/synacos/nacos_config_manager.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/synacos/nacos_heartbeat_manager.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/synacos/nacos_service.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/synacos/nacos_service_discovery.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/synacos/nacos_service_registration.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/synacos/param.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/tests/deep_agent_server.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/tests/test_consistent_hash.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/tests/test_consumer_loss_rootcause.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/tests/test_consumer_recovery.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/tests/test_deep_agent.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/tests/test_dynamic_max_tokens.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/tests/test_email.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/tests/test_encoding_cache.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/tests/test_fix_verification.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/tests/test_mcp_server.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/tests/test_minimax_reasoning.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/tests/test_mq.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/tests/test_oa_login.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/tests/test_queue_priority_fallback.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/tests/test_real_summarization.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/tests/test_summarization_config.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/tests/test_summarization_real.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/tests/test_summary_leak_e2e.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/tools/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/tools/async_utils.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/tools/docs.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/tools/env.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/tools/merge_headers.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/tools/snowflake.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/tools/syemail.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/tools/timing.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/xxljob/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/xxljob/xxljob_service.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon_python_lib.egg-info/SOURCES.txt +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon_python_lib.egg-info/dependency_links.txt +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon_python_lib.egg-info/entry_points.txt +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon_python_lib.egg-info/top_level.txt +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/tests/test_acp_tool.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/tests/test_asyncio_logging.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/tests/test_config_change_notifier.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/tests/test_hotreload_snapshot.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/tests/test_llm_apikey_contextvar.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/tests/test_log_masker.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/tests/test_resilient_pg_saver.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/tests/test_sandbox_path_guard.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/tests/test_sensitive_guard.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/tests/test_simple_chat_agent.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/tests/test_skill_regex_upgrade.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/tests/test_skill_write_guard.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/tests/test_sycli.py +0 -0
- {sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/tests/test_sync_skills_to_sandbox.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sycommon-python-lib
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.7a29
|
|
4
4
|
Summary: Add your description here
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -14,10 +14,10 @@ Requires-Dist: elasticsearch==9.4.1
|
|
|
14
14
|
Requires-Dist: fastapi==0.139.0
|
|
15
15
|
Requires-Dist: jinja2==3.1.6
|
|
16
16
|
Requires-Dist: kafka-python==3.0.7
|
|
17
|
-
Requires-Dist: langchain==1.3.
|
|
18
|
-
Requires-Dist: langchain-core==1.4.
|
|
19
|
-
Requires-Dist: langchain-openai==1.3.
|
|
20
|
-
Requires-Dist: langfuse==4.13.
|
|
17
|
+
Requires-Dist: langchain==1.3.12
|
|
18
|
+
Requires-Dist: langchain-core==1.4.9
|
|
19
|
+
Requires-Dist: langchain-openai==1.3.4
|
|
20
|
+
Requires-Dist: langfuse==4.13.2
|
|
21
21
|
Requires-Dist: langgraph==1.2.8
|
|
22
22
|
Requires-Dist: langgraph-checkpoint-postgres==3.1.0
|
|
23
23
|
Requires-Dist: langgraph-checkpoint-redis==0.5.0
|
|
@@ -36,7 +36,7 @@ Requires-Dist: sentry-sdk[fastapi]==2.64.0
|
|
|
36
36
|
Requires-Dist: sqlalchemy[asyncio]==2.0.51
|
|
37
37
|
Requires-Dist: starlette[full]==1.3.1
|
|
38
38
|
Requires-Dist: tiktoken==0.13.0
|
|
39
|
-
Requires-Dist: uvicorn==0.
|
|
39
|
+
Requires-Dist: uvicorn==0.51.0
|
|
40
40
|
Requires-Dist: wecom-aibot-python-sdk==1.0.2
|
|
41
41
|
Requires-Dist: twine==6.2.0
|
|
42
42
|
Requires-Dist: minio==7.2.20
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "sycommon-python-lib"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.7a29"
|
|
4
4
|
description = "Add your description here"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
@@ -15,10 +15,10 @@ dependencies = [
|
|
|
15
15
|
"fastapi==0.139.0",
|
|
16
16
|
"jinja2==3.1.6",
|
|
17
17
|
"kafka-python==3.0.7",
|
|
18
|
-
"langchain==1.3.
|
|
19
|
-
"langchain-core==1.4.
|
|
20
|
-
"langchain-openai==1.3.
|
|
21
|
-
"langfuse==4.13.
|
|
18
|
+
"langchain==1.3.12",
|
|
19
|
+
"langchain-core==1.4.9",
|
|
20
|
+
"langchain-openai==1.3.4",
|
|
21
|
+
"langfuse==4.13.2",
|
|
22
22
|
"langgraph==1.2.8",
|
|
23
23
|
"langgraph-checkpoint-postgres==3.1.0",
|
|
24
24
|
"langgraph-checkpoint-redis==0.5.0",
|
|
@@ -37,7 +37,7 @@ dependencies = [
|
|
|
37
37
|
"sqlalchemy[asyncio]==2.0.51",
|
|
38
38
|
"starlette[full]==1.3.1",
|
|
39
39
|
"tiktoken==0.13.0",
|
|
40
|
-
"uvicorn==0.
|
|
40
|
+
"uvicorn==0.51.0",
|
|
41
41
|
"wecom-aibot-python-sdk==1.0.2",
|
|
42
42
|
"twine==6.2.0",
|
|
43
43
|
"minio==7.2.20",
|
{sycommon_python_lib-0.2.7a27 → sycommon_python_lib-0.2.7a29}/src/sycommon/agent/deep_agent.py
RENAMED
|
@@ -97,11 +97,12 @@ def _patch_agent_streaming(agent):
|
|
|
97
97
|
删除此函数及调用即可。
|
|
98
98
|
"""
|
|
99
99
|
# 已验证兼容的版本范围(超出仅警告, 不阻断 —— 闭包强校验是真正的安全网)
|
|
100
|
-
# 1.3.10/1.3.11 + langchain_core 1.4.8 经实测确认闭包结构兼容
|
|
101
|
-
#
|
|
102
|
-
#
|
|
103
|
-
# ainvoke + 不传 config,
|
|
104
|
-
|
|
100
|
+
# 1.3.10/1.3.11/1.3.12 + langchain_core 1.4.8/1.4.9 经实测确认闭包结构兼容
|
|
101
|
+
# (factory.py 在 1.3.11→1.3.12 字节级无变化: amodel_node freevars 含
|
|
102
|
+
# _execute_model_async, 内层 freevars 含 _get_bound_model/_handle_model_output),
|
|
103
|
+
# patch 正常生效。1.3.12 的 _execute_model_async 仍为 ainvoke + 不传 config,
|
|
104
|
+
# 官方未修复, 补丁仍需保留。
|
|
105
|
+
_VERIFIED = {"langchain": "1.3.12", "langchain_core": "1.4.9"}
|
|
105
106
|
try:
|
|
106
107
|
import langchain as _lc
|
|
107
108
|
import langchain_core as _lcc
|
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
"""MCP 工具加载器
|
|
2
|
+
|
|
3
|
+
使用 langchain-mcp-adapters 官方库连接远程 MCP 服务器,
|
|
4
|
+
发现工具并作为 LangChain BaseTool 注入 Agent。
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import asyncio
|
|
8
|
+
import re
|
|
9
|
+
import time
|
|
10
|
+
import hashlib
|
|
11
|
+
from typing import List, Optional, Callable, Awaitable, Tuple, TYPE_CHECKING
|
|
12
|
+
|
|
13
|
+
from langchain_core.tools import BaseTool
|
|
14
|
+
|
|
15
|
+
from sycommon.logging.kafka_log import SYLogger
|
|
16
|
+
from sycommon.agent.mcp.models import MCPServerConfig
|
|
17
|
+
|
|
18
|
+
if TYPE_CHECKING:
|
|
19
|
+
from langchain_mcp_adapters.interceptors import MCPToolCallRequest
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# ============== MCP 工具发现缓存 ==============
|
|
23
|
+
# 缓存的是「发现的 raw MCP tools」(mcp.types.Tool 列表),用户无关、可安全共享。
|
|
24
|
+
# 命中后跳过 TCP/TLS 握手 + MCP initialize + list_tools(这才是慢的根因——
|
|
25
|
+
# 每次 create_session 都重建连接)。LangChain BaseTool 转换(per-user interceptor
|
|
26
|
+
# + display_name 注入)仍在每次调用做,但那是纯内存操作,毫秒级。
|
|
27
|
+
# 失效:TTL 过期 / 配置变更(create/update/delete) 主动 invalidate。
|
|
28
|
+
_MCP_DISCOVERY_TTL = 300 # 5 分钟
|
|
29
|
+
# key = (server_url, headers_repr);value = (raw_tools, expire_ts)
|
|
30
|
+
_mcp_discovery_cache: dict[Tuple[str, str], Tuple[list, float]] = {}
|
|
31
|
+
# 单飞锁:同一 (url, headers) 并发发现只跑一次,其余等结果
|
|
32
|
+
_mcp_inflight: dict[Tuple[str, str], asyncio.Future] = {}
|
|
33
|
+
_mcp_cache_lock = asyncio.Lock()
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def _discovery_key(config: "MCPServerConfig") -> Tuple[str, str]:
|
|
37
|
+
"""计算发现缓存 key。headers 影响鉴权 → 影响可见工具,必须纳入 key。"""
|
|
38
|
+
headers_repr = ""
|
|
39
|
+
if config.headers:
|
|
40
|
+
# 排序保证 dict 顺序不影响 key
|
|
41
|
+
try:
|
|
42
|
+
headers_repr = repr(sorted(config.headers.items()))
|
|
43
|
+
except Exception:
|
|
44
|
+
headers_repr = str(config.headers)
|
|
45
|
+
return (config.server_url, headers_repr)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
async def invalidate_mcp_cache(server_url: str = None) -> None:
|
|
49
|
+
"""使发现缓存失效。配置变更(create/update/delete)时调用。
|
|
50
|
+
|
|
51
|
+
Args:
|
|
52
|
+
server_url: 指定则只失效该 url 的条目;None 清空全部。
|
|
53
|
+
"""
|
|
54
|
+
async with _mcp_cache_lock:
|
|
55
|
+
if server_url is None:
|
|
56
|
+
n = len(_mcp_discovery_cache)
|
|
57
|
+
_mcp_discovery_cache.clear()
|
|
58
|
+
if n:
|
|
59
|
+
SYLogger.info(f"[MCP] 发现缓存已全部清空({n} 条)")
|
|
60
|
+
else:
|
|
61
|
+
# 按第一维(url)匹配,清除该 url 所有 headers 变体
|
|
62
|
+
keys_to_drop = [k for k in _mcp_discovery_cache if k[0] == server_url]
|
|
63
|
+
for k in keys_to_drop:
|
|
64
|
+
_mcp_discovery_cache.pop(k, None)
|
|
65
|
+
if keys_to_drop:
|
|
66
|
+
SYLogger.info(f"[MCP] 发现缓存已失效: {server_url}")
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
async def _discover_with_cache(config: "MCPServerConfig") -> list:
|
|
70
|
+
"""带缓存 + 单飞地发现单个 server 的 raw MCP tools。
|
|
71
|
+
|
|
72
|
+
命中缓存(未过期) → 直接返回。未命中 → 并发请求中已有 in-flight future → await 它;
|
|
73
|
+
否则自己建立连接发现,写回缓存。
|
|
74
|
+
"""
|
|
75
|
+
from langchain_mcp_adapters.client import MultiServerMCPClient
|
|
76
|
+
from langchain_mcp_adapters.tools import _list_all_tools
|
|
77
|
+
|
|
78
|
+
key = sanitize_name(config.name)
|
|
79
|
+
cache_key = _discovery_key(config)
|
|
80
|
+
|
|
81
|
+
# 1. 查缓存(无锁快路径,dict 读本身线程安全足够)
|
|
82
|
+
cached = _mcp_discovery_cache.get(cache_key)
|
|
83
|
+
if cached is not None:
|
|
84
|
+
raw_tools, expire_ts = cached
|
|
85
|
+
if time.monotonic() < expire_ts:
|
|
86
|
+
SYLogger.debug(f"[MCP] 发现缓存命中: {config.name} ({len(raw_tools)} tools)")
|
|
87
|
+
return raw_tools
|
|
88
|
+
# 过期,清掉
|
|
89
|
+
_mcp_discovery_cache.pop(cache_key, None)
|
|
90
|
+
|
|
91
|
+
# 2. 单飞:同一 key 并发只发一个请求
|
|
92
|
+
is_leader = False
|
|
93
|
+
async with _mcp_cache_lock:
|
|
94
|
+
inflight = _mcp_inflight.get(cache_key)
|
|
95
|
+
if inflight is not None:
|
|
96
|
+
waiter = inflight
|
|
97
|
+
else:
|
|
98
|
+
waiter = asyncio.get_running_loop().create_future()
|
|
99
|
+
_mcp_inflight[cache_key] = waiter
|
|
100
|
+
is_leader = True
|
|
101
|
+
if not is_leader:
|
|
102
|
+
# 有并发请求在跑,等它的结果(不重复建连)
|
|
103
|
+
return await asyncio.shield(waiter)
|
|
104
|
+
|
|
105
|
+
# 3. 自己建连发现(leader)
|
|
106
|
+
try:
|
|
107
|
+
client_config = {
|
|
108
|
+
key: {
|
|
109
|
+
"url": config.server_url,
|
|
110
|
+
"transport": "streamable_http",
|
|
111
|
+
**({"headers": config.headers} if config.headers else {}),
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
client = MultiServerMCPClient(client_config)
|
|
115
|
+
|
|
116
|
+
async def _connect_and_list():
|
|
117
|
+
async with client.session(key) as session:
|
|
118
|
+
return await _list_all_tools(session)
|
|
119
|
+
|
|
120
|
+
raw_tools = await asyncio.wait_for(
|
|
121
|
+
_connect_and_list(), timeout=_MCP_SERVER_TIMEOUT)
|
|
122
|
+
|
|
123
|
+
# 写回缓存
|
|
124
|
+
_mcp_discovery_cache[cache_key] = (raw_tools, time.monotonic() + _MCP_DISCOVERY_TTL)
|
|
125
|
+
# 唤醒所有等待者
|
|
126
|
+
if not waiter.done():
|
|
127
|
+
waiter.set_result(raw_tools)
|
|
128
|
+
return raw_tools
|
|
129
|
+
except BaseException as e:
|
|
130
|
+
# 失败不写缓存,把真实异常透传给所有等待者(各自在 _load_one_server 里兜底返回 [])
|
|
131
|
+
if not waiter.done():
|
|
132
|
+
waiter.set_exception(RuntimeError(f"MCP 发现失败: {e}"))
|
|
133
|
+
raise
|
|
134
|
+
finally:
|
|
135
|
+
_mcp_inflight.pop(cache_key, None)
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
def sanitize_name(name: str) -> str:
|
|
139
|
+
"""将名称转为合法的标识符,中文等非ASCII字符做 transliterate"""
|
|
140
|
+
sanitized = re.sub(r'[^a-zA-Z0-9_]', '_', name).strip('_')
|
|
141
|
+
if not sanitized:
|
|
142
|
+
h = hashlib.md5(name.encode()).hexdigest()[:8]
|
|
143
|
+
sanitized = f"mcp_{h}"
|
|
144
|
+
return sanitized
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
def _contains_auth_error(err_msg: str) -> bool:
|
|
148
|
+
"""检查错误信息中是否包含认证相关关键词"""
|
|
149
|
+
auth_keywords = [
|
|
150
|
+
"401", "unauthorized", "token expired", "authentication failed",
|
|
151
|
+
"440", "login timeout", "403", "forbidden",
|
|
152
|
+
"认证失败", "登录过期", "token无效", "token过期",
|
|
153
|
+
"syt_token", "SYT_TOKEN",
|
|
154
|
+
]
|
|
155
|
+
msg_lower = err_msg.lower()
|
|
156
|
+
return any(kw.lower() in msg_lower for kw in auth_keywords)
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
def _auth_error_hint() -> str:
|
|
160
|
+
"""返回认证错误时的 authorize 工具调用提示"""
|
|
161
|
+
return (
|
|
162
|
+
"\n\n⚠️ **检测到认证错误**:这可能是 SYT_TOKEN 过期或未设置导致的。"
|
|
163
|
+
"请立即调用 `authorize` 工具(传入失败原因和待重试的命令),"
|
|
164
|
+
"让用户重新授权后再自动重试。不要只是告知用户有问题。"
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
def wrap_tool_with_error_handler(
|
|
169
|
+
tool: BaseTool,
|
|
170
|
+
server_config_id: str,
|
|
171
|
+
server_name: str,
|
|
172
|
+
original_tool_name: str,
|
|
173
|
+
on_tool_success: Optional[Callable[[str, str], Awaitable[None]]] = None,
|
|
174
|
+
on_tool_error: Optional[Callable[[str, str, str], Awaitable[None]]] = None,
|
|
175
|
+
) -> BaseTool:
|
|
176
|
+
"""包装 MCP 工具的 coroutine,捕获连接/超时等异常,返回友好的错误信息而非抛出异常。
|
|
177
|
+
|
|
178
|
+
Args:
|
|
179
|
+
on_tool_success: 异步回调 (server_config_id, tool_name) -> None
|
|
180
|
+
on_tool_error: 异步回调 (server_config_id, tool_name, error_msg) -> None
|
|
181
|
+
"""
|
|
182
|
+
is_content_and_artifact = getattr(
|
|
183
|
+
tool, 'response_format', '') == 'content_and_artifact'
|
|
184
|
+
original_coroutine = tool.coroutine
|
|
185
|
+
tool_name = tool.name
|
|
186
|
+
|
|
187
|
+
MAX_RETRIES = 2
|
|
188
|
+
RETRY_DELAY_BASE = 1.0 # 秒
|
|
189
|
+
|
|
190
|
+
async def _safe_coroutine(*args, **kwargs):
|
|
191
|
+
last_exception = None
|
|
192
|
+
for attempt in range(MAX_RETRIES + 1):
|
|
193
|
+
try:
|
|
194
|
+
result = await original_coroutine(*args, **kwargs)
|
|
195
|
+
if on_tool_success:
|
|
196
|
+
try:
|
|
197
|
+
await on_tool_success(server_config_id, original_tool_name)
|
|
198
|
+
except Exception:
|
|
199
|
+
pass
|
|
200
|
+
return result
|
|
201
|
+
except Exception as e:
|
|
202
|
+
last_exception = e
|
|
203
|
+
if attempt < MAX_RETRIES:
|
|
204
|
+
delay = RETRY_DELAY_BASE * (attempt + 1)
|
|
205
|
+
SYLogger.info(
|
|
206
|
+
f"[MCP] 工具 '{tool_name}' 第 {attempt + 1}/{MAX_RETRIES} 次重试 "
|
|
207
|
+
f"({type(e).__name__}: {str(e)[:200]}), {delay}s 后重试")
|
|
208
|
+
await asyncio.sleep(delay)
|
|
209
|
+
continue
|
|
210
|
+
|
|
211
|
+
# 重试耗尽,返回错误
|
|
212
|
+
from langchain_core.tools import ToolException
|
|
213
|
+
err_type = type(e).__name__
|
|
214
|
+
err_msg = str(e)[:500]
|
|
215
|
+
SYLogger.warning(
|
|
216
|
+
f"[MCP] 工具 '{tool_name}' 调用失败,已重试 {MAX_RETRIES} 次 "
|
|
217
|
+
f"({err_type}): {err_msg}")
|
|
218
|
+
|
|
219
|
+
if on_tool_error:
|
|
220
|
+
try:
|
|
221
|
+
await on_tool_error(server_config_id, original_tool_name, f"{err_type}: {err_msg}")
|
|
222
|
+
except Exception:
|
|
223
|
+
pass
|
|
224
|
+
|
|
225
|
+
if isinstance(e, ToolException):
|
|
226
|
+
friendly_msg = (
|
|
227
|
+
f"MCP 工具 '{tool_name}' 调用失败(已重试 {MAX_RETRIES} 次)。\n"
|
|
228
|
+
f"错误详情: {err_msg}\n"
|
|
229
|
+
f"请根据错误信息判断是否可以不使用该工具继续完成任务。"
|
|
230
|
+
)
|
|
231
|
+
else:
|
|
232
|
+
friendly_msg = (
|
|
233
|
+
f"MCP 工具调用失败:工具 '{tool_name}' (服务器: {server_name}) 当前不可用(已重试 {MAX_RETRIES} 次)。\n"
|
|
234
|
+
f"错误类型: {err_type}\n"
|
|
235
|
+
f"可能原因: MCP 服务器未启动、网络不可达或连接超时。\n"
|
|
236
|
+
f"请尝试不使用该工具继续完成任务,或联系管理员检查 MCP 服务 '{server_name}'。"
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
# 检测认证错误,追加 authorize 工具提示
|
|
240
|
+
if _contains_auth_error(err_msg):
|
|
241
|
+
friendly_msg += _auth_error_hint()
|
|
242
|
+
if is_content_and_artifact:
|
|
243
|
+
return friendly_msg, None
|
|
244
|
+
return [friendly_msg]
|
|
245
|
+
|
|
246
|
+
tool.coroutine = _safe_coroutine
|
|
247
|
+
return tool
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
def _make_user_id_interceptor(user_id: str):
|
|
251
|
+
"""创建 MCP 工具调用拦截器,注入 X-User-Id header"""
|
|
252
|
+
async def inject_user_id(
|
|
253
|
+
request: "MCPToolCallRequest",
|
|
254
|
+
handler: Callable[["MCPToolCallRequest"], Awaitable],
|
|
255
|
+
):
|
|
256
|
+
headers = dict(request.headers or {})
|
|
257
|
+
headers["X-User-Id"] = user_id
|
|
258
|
+
request = request.override(headers=headers)
|
|
259
|
+
return await handler(request)
|
|
260
|
+
|
|
261
|
+
return inject_user_id
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
# 单个 MCP 服务器连接超时(秒)。慢/不健康的服务器不应拖垮整批并发加载。
|
|
265
|
+
_MCP_SERVER_TIMEOUT = 10
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
async def _load_one_server(
|
|
269
|
+
config: "MCPServerConfig",
|
|
270
|
+
interceptors: list,
|
|
271
|
+
tool_display_names: Optional[dict],
|
|
272
|
+
on_tool_success=None,
|
|
273
|
+
on_tool_error=None,
|
|
274
|
+
on_batch_available=None,
|
|
275
|
+
on_server_failure=None,
|
|
276
|
+
) -> List[BaseTool]:
|
|
277
|
+
"""连接单个 MCP 服务器并加载其工具。
|
|
278
|
+
|
|
279
|
+
独立的异常隔离单元:单个服务器失败/超时返回空列表,不拖累其他服务器。
|
|
280
|
+
被并发调度(load_mcp_tools 里 asyncio.gather)。
|
|
281
|
+
|
|
282
|
+
慢的根因是「建连 + MCP initialize + list_tools」(每次 create_session 都重建)。
|
|
283
|
+
这一步用 _discover_with_cache 命中缓存(进程级 + 单飞),命中即跳过建连。
|
|
284
|
+
后续 LangChain BaseTool 转换(per-user interceptor + display_name 注入)是纯内存操作,
|
|
285
|
+
不缓存,每次都做——保持 per-user 隔离正确。
|
|
286
|
+
"""
|
|
287
|
+
try:
|
|
288
|
+
from langchain_mcp_adapters.tools import convert_mcp_tool_to_langchain_tool
|
|
289
|
+
|
|
290
|
+
key = sanitize_name(config.name)
|
|
291
|
+
client_config = {
|
|
292
|
+
key: {
|
|
293
|
+
"url": config.server_url,
|
|
294
|
+
"transport": "streamable_http",
|
|
295
|
+
**({"headers": config.headers} if config.headers else {}),
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
# 🔑 命中缓存则跳过建连+握手+list_tools(毫秒级),未命中才真正连一次
|
|
300
|
+
raw_tools = await _discover_with_cache(config)
|
|
301
|
+
|
|
302
|
+
original_names = []
|
|
303
|
+
server_tools: List[BaseTool] = []
|
|
304
|
+
for tool in raw_tools:
|
|
305
|
+
original_name = tool.name
|
|
306
|
+
original_names.append(original_name)
|
|
307
|
+
|
|
308
|
+
lc_tool = convert_mcp_tool_to_langchain_tool(
|
|
309
|
+
None,
|
|
310
|
+
tool,
|
|
311
|
+
connection=client_config[key],
|
|
312
|
+
tool_interceptors=interceptors if interceptors else None,
|
|
313
|
+
server_name=config.name,
|
|
314
|
+
tool_name_prefix=False,
|
|
315
|
+
)
|
|
316
|
+
|
|
317
|
+
lc_tool.name = f"mcp__{key}__{original_name}"
|
|
318
|
+
if lc_tool.description and not lc_tool.description.startswith("[MCP"):
|
|
319
|
+
lc_tool.description = f"[MCP:{config.name}] {lc_tool.description}"
|
|
320
|
+
# 注入中文别名到 description,让 LLM 能识别用户说的中文名
|
|
321
|
+
if tool_display_names:
|
|
322
|
+
dn = tool_display_names.get(lc_tool.name)
|
|
323
|
+
if dn:
|
|
324
|
+
lc_tool.description = f"[别名: {dn}] {lc_tool.description}"
|
|
325
|
+
lc_tool = wrap_tool_with_error_handler(
|
|
326
|
+
lc_tool, config.id, config.name, original_name,
|
|
327
|
+
on_tool_success=on_tool_success,
|
|
328
|
+
on_tool_error=on_tool_error,
|
|
329
|
+
)
|
|
330
|
+
server_tools.append(lc_tool)
|
|
331
|
+
|
|
332
|
+
if on_batch_available:
|
|
333
|
+
try:
|
|
334
|
+
await on_batch_available(config.id, original_names)
|
|
335
|
+
except Exception as e:
|
|
336
|
+
SYLogger.warning(f"[MCP] 写入工具状态失败: {e}")
|
|
337
|
+
|
|
338
|
+
SYLogger.info(
|
|
339
|
+
f"[MCP] 服务器 '{config.name}' 加载了 {len(raw_tools)} 个工具")
|
|
340
|
+
return server_tools
|
|
341
|
+
|
|
342
|
+
except asyncio.TimeoutError:
|
|
343
|
+
SYLogger.warning(
|
|
344
|
+
f"[MCP] 服务器 '{config.name}' ({config.server_url}) "
|
|
345
|
+
f"连接超时(>{_MCP_SERVER_TIMEOUT}s),跳过")
|
|
346
|
+
if on_server_failure:
|
|
347
|
+
try:
|
|
348
|
+
await on_server_failure(config.id, f"连接超时(>{_MCP_SERVER_TIMEOUT}s)")
|
|
349
|
+
except Exception:
|
|
350
|
+
pass
|
|
351
|
+
return []
|
|
352
|
+
except asyncio.CancelledError:
|
|
353
|
+
# 单飞失败透传的哨兵(_discover_with_cache 失败时唤醒等待者用),按失败处理
|
|
354
|
+
SYLogger.warning(
|
|
355
|
+
f"[MCP] 服务器 '{config.name}' ({config.server_url}) 发现失败,跳过")
|
|
356
|
+
if on_server_failure:
|
|
357
|
+
try:
|
|
358
|
+
await on_server_failure(config.id, "发现失败")
|
|
359
|
+
except Exception:
|
|
360
|
+
pass
|
|
361
|
+
return []
|
|
362
|
+
except Exception as e:
|
|
363
|
+
SYLogger.warning(
|
|
364
|
+
f"[MCP] 服务器 '{config.name}' ({config.server_url}) 连接失败,跳过: {e}")
|
|
365
|
+
if on_server_failure:
|
|
366
|
+
try:
|
|
367
|
+
await on_server_failure(config.id, str(e)[:300])
|
|
368
|
+
except Exception:
|
|
369
|
+
pass
|
|
370
|
+
return []
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
async def load_mcp_tools(
|
|
374
|
+
configs: List[MCPServerConfig],
|
|
375
|
+
user_id: str = None,
|
|
376
|
+
tool_display_names: Optional[dict] = None,
|
|
377
|
+
on_tool_success: Optional[Callable[[str, str], Awaitable[None]]] = None,
|
|
378
|
+
on_tool_error: Optional[Callable[[str, str, str], Awaitable[None]]] = None,
|
|
379
|
+
on_batch_available: Optional[Callable[[
|
|
380
|
+
str, list], Awaitable[None]]] = None,
|
|
381
|
+
on_server_failure: Optional[Callable[[str, str], Awaitable[None]]] = None,
|
|
382
|
+
) -> List[BaseTool]:
|
|
383
|
+
"""加载 MCP 工具列表
|
|
384
|
+
|
|
385
|
+
接受 MCPServerConfig 列表,并发连接所有服务器并加载工具。
|
|
386
|
+
|
|
387
|
+
Args:
|
|
388
|
+
configs: MCP 服务器配置列表(仅 enabled 的会被处理)
|
|
389
|
+
user_id: 当前用户 ID,通过 interceptor 注入到每次 MCP 工具调用的 header 中
|
|
390
|
+
tool_display_names: 可选的工具中文显示名映射 {tool_full_name: display_name}
|
|
391
|
+
on_tool_success: 单个工具调用成功回调
|
|
392
|
+
on_tool_error: 单个工具调用失败回调
|
|
393
|
+
on_batch_available: 服务器连接成功后批量标记工具可用回调 (config_id, tool_names)
|
|
394
|
+
on_server_failure: 服务器连接失败回调 (config_id, error_msg)
|
|
395
|
+
"""
|
|
396
|
+
enabled_configs = [c for c in configs if c.enabled]
|
|
397
|
+
if not enabled_configs:
|
|
398
|
+
return []
|
|
399
|
+
|
|
400
|
+
# 构建 interceptor 链
|
|
401
|
+
interceptors = []
|
|
402
|
+
if user_id:
|
|
403
|
+
interceptors.append(_make_user_id_interceptor(user_id))
|
|
404
|
+
|
|
405
|
+
# 并发连接所有服务器:总耗时 ≈ max(单服务器),而非 Σ(单服务器)。
|
|
406
|
+
# 每个服务器在 _load_one_server 内独立异常隔离 + 超时兜底。
|
|
407
|
+
per_server_results = await asyncio.gather(*[
|
|
408
|
+
_load_one_server(
|
|
409
|
+
config, interceptors, tool_display_names,
|
|
410
|
+
on_tool_success, on_tool_error, on_batch_available, on_server_failure,
|
|
411
|
+
)
|
|
412
|
+
for config in enabled_configs
|
|
413
|
+
], return_exceptions=False)
|
|
414
|
+
|
|
415
|
+
all_tools: List[BaseTool] = []
|
|
416
|
+
for tools in per_server_results:
|
|
417
|
+
if tools:
|
|
418
|
+
all_tools.extend(tools)
|
|
419
|
+
|
|
420
|
+
if all_tools:
|
|
421
|
+
SYLogger.info(f"[MCP] 共加载 {len(all_tools)} 个 MCP 工具")
|
|
422
|
+
return all_tools
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
async def test_mcp_connection(server_url: str, headers: dict = None) -> dict:
|
|
426
|
+
"""测试 MCP 服务器连接,返回发现的工具列表"""
|
|
427
|
+
try:
|
|
428
|
+
from langchain_mcp_adapters.client import MultiServerMCPClient
|
|
429
|
+
|
|
430
|
+
client_config = {
|
|
431
|
+
"test": {
|
|
432
|
+
"url": server_url,
|
|
433
|
+
"transport": "streamable_http",
|
|
434
|
+
**({"headers": headers} if headers else {}),
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
client = MultiServerMCPClient(client_config)
|
|
439
|
+
tools = await client.get_tools()
|
|
440
|
+
|
|
441
|
+
return {
|
|
442
|
+
"success": True,
|
|
443
|
+
"tools": [{"name": t.name, "description": t.description or ""} for t in tools],
|
|
444
|
+
}
|
|
445
|
+
except Exception as e:
|
|
446
|
+
return {
|
|
447
|
+
"success": False,
|
|
448
|
+
"error": str(e),
|
|
449
|
+
}
|
|
@@ -24,6 +24,10 @@ from sycommon.logging.kafka_log import SYLogger
|
|
|
24
24
|
# 日期快照功能预留,当前暂不启用
|
|
25
25
|
_SNAPSHOT_ENABLED = False
|
|
26
26
|
|
|
27
|
+
# restore_from_minio 的 MinIO 下载并发度(同时下载的文件数上限)。
|
|
28
|
+
# 与 _sync_batch(sync→minio 方向)的 batch_size 对齐为 5,避免压垮 MinIO/网络。
|
|
29
|
+
_RESTORE_CONCURRENCY = 5
|
|
30
|
+
|
|
27
31
|
|
|
28
32
|
class MinioSyncService(metaclass=SingletonMeta):
|
|
29
33
|
"""MinIO 文件同步服务(单例)"""
|
|
@@ -759,12 +763,15 @@ class MinioSyncService(metaclass=SingletonMeta):
|
|
|
759
763
|
|
|
760
764
|
SYLogger.info(f"[MinIO] 需恢复 {len(to_restore)} 个文件到沙箱: user={user_id}")
|
|
761
765
|
|
|
762
|
-
# 4.
|
|
766
|
+
# 4. 并发恢复:MinIO 下载用全局 Semaphore(5) 限流并发,沙箱上传仍按批 batch_upload。
|
|
767
|
+
# 旧实现是「批内串行下载 + 批间串行」,N 个文件 ≈ N 次串行 MinIO GET,27 个文件要数十秒。
|
|
768
|
+
# 改为 Semaphore(5) 后下载并发,总耗时 ≈ ceil(N/5) 次串行往返,对齐 _sync_batch 的并发度。
|
|
763
769
|
restored = 0
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
770
|
+
download_sem = asyncio.Semaphore(_RESTORE_CONCURRENCY)
|
|
771
|
+
|
|
772
|
+
async def _download_one(rel_path: str):
|
|
773
|
+
"""下载单个 MinIO 对象到内存,返回 (沙箱绝对路径, 内容) 或 None。"""
|
|
774
|
+
async with download_sem:
|
|
768
775
|
try:
|
|
769
776
|
def _download_object(bucket, key):
|
|
770
777
|
resp = self._client.get_object(bucket, key)
|
|
@@ -777,21 +784,32 @@ class MinioSyncService(metaclass=SingletonMeta):
|
|
|
777
784
|
content = await asyncio.to_thread(
|
|
778
785
|
_download_object, self._bucket, f"{prefix}{rel_path}"
|
|
779
786
|
)
|
|
780
|
-
|
|
787
|
+
return (f"/{rel_path}", content)
|
|
781
788
|
except Exception as e:
|
|
782
789
|
SYLogger.warning(f"[MinIO] 下载文件失败: {rel_path}, error={e}")
|
|
790
|
+
return None
|
|
783
791
|
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
792
|
+
# 全量并发下载(受 Semaphore 限流),比按批串行快得多
|
|
793
|
+
download_results = await asyncio.gather(
|
|
794
|
+
*[_download_one(rp) for rp in to_restore]
|
|
795
|
+
)
|
|
796
|
+
downloaded = [r for r in download_results if r is not None]
|
|
797
|
+
|
|
798
|
+
# 上传仍走 batch_upload(服务端并发),按 5 个一批发(沙箱端点对超大批量可能限流)
|
|
799
|
+
for i in range(0, len(downloaded), _RESTORE_CONCURRENCY):
|
|
800
|
+
batch = downloaded[i:i + _RESTORE_CONCURRENCY]
|
|
801
|
+
if not batch:
|
|
802
|
+
continue
|
|
803
|
+
try:
|
|
804
|
+
results = await sandbox_backend.aupload_files(batch)
|
|
805
|
+
for r in results:
|
|
806
|
+
if not r.error:
|
|
807
|
+
restored += 1
|
|
808
|
+
else:
|
|
809
|
+
SYLogger.warning(
|
|
810
|
+
f"[MinIO] 上传到沙箱失败: {r.path}, error={r.error}")
|
|
811
|
+
except Exception as e:
|
|
812
|
+
SYLogger.warning(f"[MinIO] 批量上传到沙箱失败: {e}")
|
|
795
813
|
|
|
796
814
|
SYLogger.info(
|
|
797
815
|
f"[MinIO] 恢复完成: user={user_id}, restored={restored}/{len(to_restore)}")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sycommon-python-lib
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.7a29
|
|
4
4
|
Summary: Add your description here
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -14,10 +14,10 @@ Requires-Dist: elasticsearch==9.4.1
|
|
|
14
14
|
Requires-Dist: fastapi==0.139.0
|
|
15
15
|
Requires-Dist: jinja2==3.1.6
|
|
16
16
|
Requires-Dist: kafka-python==3.0.7
|
|
17
|
-
Requires-Dist: langchain==1.3.
|
|
18
|
-
Requires-Dist: langchain-core==1.4.
|
|
19
|
-
Requires-Dist: langchain-openai==1.3.
|
|
20
|
-
Requires-Dist: langfuse==4.13.
|
|
17
|
+
Requires-Dist: langchain==1.3.12
|
|
18
|
+
Requires-Dist: langchain-core==1.4.9
|
|
19
|
+
Requires-Dist: langchain-openai==1.3.4
|
|
20
|
+
Requires-Dist: langfuse==4.13.2
|
|
21
21
|
Requires-Dist: langgraph==1.2.8
|
|
22
22
|
Requires-Dist: langgraph-checkpoint-postgres==3.1.0
|
|
23
23
|
Requires-Dist: langgraph-checkpoint-redis==0.5.0
|
|
@@ -36,7 +36,7 @@ Requires-Dist: sentry-sdk[fastapi]==2.64.0
|
|
|
36
36
|
Requires-Dist: sqlalchemy[asyncio]==2.0.51
|
|
37
37
|
Requires-Dist: starlette[full]==1.3.1
|
|
38
38
|
Requires-Dist: tiktoken==0.13.0
|
|
39
|
-
Requires-Dist: uvicorn==0.
|
|
39
|
+
Requires-Dist: uvicorn==0.51.0
|
|
40
40
|
Requires-Dist: wecom-aibot-python-sdk==1.0.2
|
|
41
41
|
Requires-Dist: twine==6.2.0
|
|
42
42
|
Requires-Dist: minio==7.2.20
|
|
@@ -8,10 +8,10 @@ elasticsearch==9.4.1
|
|
|
8
8
|
fastapi==0.139.0
|
|
9
9
|
jinja2==3.1.6
|
|
10
10
|
kafka-python==3.0.7
|
|
11
|
-
langchain==1.3.
|
|
12
|
-
langchain-core==1.4.
|
|
13
|
-
langchain-openai==1.3.
|
|
14
|
-
langfuse==4.13.
|
|
11
|
+
langchain==1.3.12
|
|
12
|
+
langchain-core==1.4.9
|
|
13
|
+
langchain-openai==1.3.4
|
|
14
|
+
langfuse==4.13.2
|
|
15
15
|
langgraph==1.2.8
|
|
16
16
|
langgraph-checkpoint-postgres==3.1.0
|
|
17
17
|
langgraph-checkpoint-redis==0.5.0
|
|
@@ -30,7 +30,7 @@ sentry-sdk[fastapi]==2.64.0
|
|
|
30
30
|
sqlalchemy[asyncio]==2.0.51
|
|
31
31
|
starlette[full]==1.3.1
|
|
32
32
|
tiktoken==0.13.0
|
|
33
|
-
uvicorn==0.
|
|
33
|
+
uvicorn==0.51.0
|
|
34
34
|
wecom-aibot-python-sdk==1.0.2
|
|
35
35
|
twine==6.2.0
|
|
36
36
|
minio==7.2.20
|