sycommon-python-lib 0.2.7a56__tar.gz → 0.2.8a1__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.7a56 → sycommon_python_lib-0.2.8a1}/PKG-INFO +4 -4
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/pyproject.toml +4 -4
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/deep_agent.py +7 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/multi_agent_team.py +4 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/sandbox/file_ops.py +5 -1
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/sandbox/http_sandbox_backend.py +16 -2
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/config/Config.py +24 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/database/async_base_db_service.py +41 -6
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/database/async_database_service.py +84 -17
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/llm/sy_langfuse.py +1 -1
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/llm/token_usage_mysql_service.py +1 -1
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/logging/kafka_log.py +1 -1
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/middleware/sandbox.py +70 -11
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/models/base_http.py +52 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/models/sandbox.py +5 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/notice/uvicorn_monitor.py +4 -4
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/rabbitmq/rabbitmq_service_producer_manager.py +1 -2
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/sentry/sy_sentry.py +1 -1
- sycommon_python_lib-0.2.8a1/src/sycommon/tests/test_env_tenant_helper.py +72 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon_python_lib.egg-info/PKG-INFO +4 -4
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon_python_lib.egg-info/SOURCES.txt +1 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon_python_lib.egg-info/requires.txt +3 -3
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/README.md +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/setup.cfg +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/cli.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/core/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/core/console.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/core/models.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/core/project.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/core/utils.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/agent/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/agent/agent/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/agent/agent/main_agent.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/agent/agent/nodes/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/agent/agent/nodes/example_node.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/agent/agent/states/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/agent/agent/states/agent_state.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/agent/api/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/agent/api/query.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/agent/api/sse/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/agent/api/sse/agent.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/agent/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/agent/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/agent/db/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/agent/db/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/agent/db/model/entity.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/agent/db/service.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/agent/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/agent/model/parse.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/agent/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/agent/tools/mq.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/base/.env.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/base/.gitignore.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/base/Dockerfile.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/base/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/base/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/base/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/base/app.yaml.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/base/client/FileServiceClient.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/base/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/base/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/base/model/file_info.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/base/requirements.txt.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/cli/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/cli/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/cli/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/cli/commands/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/cli/commands/hello.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/cli/pyproject.toml.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/cli/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/web/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/web/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/web/api/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/web/api/echo.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/web/api/sse/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/web/api/sse/echo.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/web/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/web/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/web/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/web/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/command/templates/web/tools/mq.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/nexus/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/__main__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/acp/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/acp/config.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/acp/executor.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/acp/registry.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/acp/server.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/agents/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/agents/factory.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/agents/prompts.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/cdp/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/cdp/browser.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/cdp/capabilities/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/cdp/capabilities/console.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/cdp/capabilities/dom.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/cdp/capabilities/network.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/cdp/capabilities/page_errors.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/cdp/capabilities/performance.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/cdp/capabilities/screenshot.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/cdp/client.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/cdp/protocol.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/cdp/repl.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/cli.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/commands/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/commands/acp_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/commands/cdp_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/commands/chat_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/commands/create_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/commands/evaluate_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/commands/init_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/commands/memory_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/commands/resume_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/commands/rollback_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/commands/run_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/core/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/core/backend.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/core/config.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/core/display.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/core/git_integration.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/core/llm.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/core/state.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/evaluate/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/evaluate/api_evaluator.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/memory/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/memory/compressor.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/memory/full.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/memory/hot.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/memory/manager.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/memory/warm.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/mode/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/mode/create.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/mode/optimize.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/models/config_models.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/rl/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/rl/baseline_tests.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/rl/checkpoint.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/rl/convergence.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/rl/diagnosis.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/rl/engine.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/rl/environment.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/rl/experience.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/rl/harness_prompts.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/rl/history.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/rl/optimization_logger.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/rl/pre_validation.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/rl/reward.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/rl/strategy_bandit.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/rl/strategy_generator.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/rl/strategy_prompts.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/simple_chat_agent.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycli/skills/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/acp/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/acp/client.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/acp/fetch.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/acp/ssh_init.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/acp/tool.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/agent_manager.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/chat_events.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/mcp/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/mcp/models.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/mcp/tool_loader.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/middleware/model_request_prep.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/middleware/sandbox_path_guard.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/middleware/sensitive_guard.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/middleware/sitecustomize.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/middleware/skill_api_whitelist.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/middleware/skill_wl_check.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/middleware/skill_write_guard.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/reasoning_content_patch.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/resume_compactor.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/sandbox/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/sandbox/consistent_hash.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/sandbox/minio_sync.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/sandbox/sandbox_pool.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/sandbox/sandbox_recovery.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/sandbox/session.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/summarization_utils.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/auth/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/auth/ldap_service.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/auth/oa_cache.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/auth/oa_crypto.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/auth/oa_service.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/auth/wecom_ldap_service.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/config/ACPAgentConfig.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/config/DatabaseConfig.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/config/ElasticsearchConfig.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/config/EmbeddingConfig.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/config/LLMConfig.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/config/LangfuseConfig.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/config/MQConfig.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/config/PgConfig.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/config/RedisConfig.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/config/RerankerConfig.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/config/SentryConfig.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/config/SkillApiWhitelistConfig.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/config/XxlJobConfig.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/config/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/config/config_change_notifier.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/database/base_db_service.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/database/database_service.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/database/elasticsearch_service.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/database/pg_checkpoint_service.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/database/redis_service.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/database/resilient_pg_saver.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/database/token_usage_db_service.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/health/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/health/health_check.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/health/metrics.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/health/ping.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/heartbeat_process/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/heartbeat_process/heartbeat_config.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/heartbeat_process/heartbeat_process_manager.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/heartbeat_process/heartbeat_process_worker.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/llm/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/llm/embedding.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/llm/get_llm.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/llm/llm_logger.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/llm/llm_tokens.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/llm/llm_with_token_tracking.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/llm/native_with_fallback_runnable.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/llm/output_fixing_runnable.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/llm/struct_token.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/llm/tiktoken_cache/9b5ad71b2ce5302211f9c61530b329a4922fc6a4 +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/llm/tiktoken_cache/fb374d419588a4632f3f557e76b4b70aebbca790 +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/llm/token_usage_es_service.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/llm/token_utils.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/llm/usage_token.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/logging/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/logging/async_sql_logger.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/logging/log_masker.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/logging/logger_levels.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/logging/logger_wrapper.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/logging/process_logger.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/logging/sql_logger.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/mcp_server/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/mcp_server/server.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/middleware/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/middleware/context.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/middleware/cors.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/middleware/docs.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/middleware/exception.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/middleware/middleware.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/middleware/monitor_memory.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/middleware/mq.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/middleware/timeout.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/middleware/token_tracking.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/middleware/tool_result_truncation.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/middleware/traceid.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/models/log.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/models/mcp_server_config.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/models/mqlistener_config.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/models/mqmsg_model.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/models/mqsend_config.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/models/sso_user.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/models/token_usage.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/models/token_usage_mysql.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/models/xxljob_handler_config.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/notice/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/notice/wecom_message.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/rabbitmq/process_pool_consumer.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/rabbitmq/rabbitmq_client.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/rabbitmq/rabbitmq_pool.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/rabbitmq/rabbitmq_service.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/rabbitmq/rabbitmq_service_client_manager.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/rabbitmq/rabbitmq_service_connection_monitor.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/rabbitmq/rabbitmq_service_consumer_manager.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/rabbitmq/rabbitmq_service_core.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/sentry/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/services.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/sse/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/sse/event.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/sse/sse.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/synacos/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/synacos/example.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/synacos/example2.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/synacos/feign.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/synacos/feign_client.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/synacos/nacos_client_base.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/synacos/nacos_config_manager.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/synacos/nacos_heartbeat_manager.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/synacos/nacos_service.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/synacos/nacos_service_discovery.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/synacos/nacos_service_registration.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/synacos/param.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/deep_agent_server.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/test_consistent_hash.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/test_consume_dedup.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/test_consumer_loss_rootcause.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/test_consumer_recovery.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/test_consumer_recovery_fix.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/test_consumer_tags_sync.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/test_deep_agent.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/test_dynamic_max_tokens.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/test_email.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/test_encoding_cache.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/test_exp_concurrent_migrate.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/test_exp_delete_queue_with_consumers.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/test_fault_injection_real.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/test_fix_verification.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/test_heartbeat_timeout.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/test_integration_real_broker.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/test_mcp_server.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/test_minimax_reasoning.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/test_mq.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/test_mq_config_driven.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/test_oa_login.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/test_queue_priority_fallback.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/test_queue_priority_upgrade_timing.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/test_real_summarization.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/test_reconnect_scenarios.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/test_summarization_config.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/test_summarization_real.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/test_summary_leak_e2e.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/test_upgrade_aio_pika.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/test_upgrade_langgraph_stream.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tests/test_upgrade_verification.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tools/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tools/async_utils.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tools/docs.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tools/env.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tools/merge_headers.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tools/snowflake.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tools/syemail.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tools/timing.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/tools/user_id.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/xxljob/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/xxljob/xxljob_service.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon_python_lib.egg-info/dependency_links.txt +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon_python_lib.egg-info/entry_points.txt +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon_python_lib.egg-info/top_level.txt +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/tests/test_acp_tool.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/tests/test_asyncio_logging.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/tests/test_config_change_notifier.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/tests/test_hotreload_snapshot.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/tests/test_llm_apikey_contextvar.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/tests/test_log_masker.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/tests/test_resilient_pg_saver.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/tests/test_sandbox_path_guard.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/tests/test_sensitive_guard.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/tests/test_simple_chat_agent.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/tests/test_skill_regex_upgrade.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/tests/test_skill_write_guard.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/tests/test_streaming_e2e.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/tests/test_sycli.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/tests/test_sync_skills_to_sandbox.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/tests/test_upload_concurrency.py +0 -0
- {sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/tests/test_upload_e2e_http.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.8a1
|
|
4
4
|
Summary: Add your description here
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -9,11 +9,11 @@ Requires-Dist: aiohttp==3.14.3
|
|
|
9
9
|
Requires-Dist: aiomysql==0.3.2
|
|
10
10
|
Requires-Dist: anyio==4.14.2
|
|
11
11
|
Requires-Dist: decorator==5.3.1
|
|
12
|
-
Requires-Dist: deepagents==0.7.
|
|
13
|
-
Requires-Dist: elasticsearch==9.
|
|
12
|
+
Requires-Dist: deepagents==0.7.4
|
|
13
|
+
Requires-Dist: elasticsearch==9.5.0
|
|
14
14
|
Requires-Dist: fastapi==0.141.1
|
|
15
15
|
Requires-Dist: jinja2==3.1.6
|
|
16
|
-
Requires-Dist: kafka-python==3.0.
|
|
16
|
+
Requires-Dist: kafka-python==3.0.10
|
|
17
17
|
Requires-Dist: langchain==1.3.14
|
|
18
18
|
Requires-Dist: langchain-core==1.5.3
|
|
19
19
|
Requires-Dist: langchain-openai==1.4.1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "sycommon-python-lib"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.8a1"
|
|
4
4
|
description = "Add your description here"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
@@ -10,11 +10,11 @@ dependencies = [
|
|
|
10
10
|
"aiomysql==0.3.2",
|
|
11
11
|
"anyio==4.14.2",
|
|
12
12
|
"decorator==5.3.1",
|
|
13
|
-
"deepagents==0.7.
|
|
14
|
-
"elasticsearch==9.
|
|
13
|
+
"deepagents==0.7.4",
|
|
14
|
+
"elasticsearch==9.5.0",
|
|
15
15
|
"fastapi==0.141.1",
|
|
16
16
|
"jinja2==3.1.6",
|
|
17
|
-
"kafka-python==3.0.
|
|
17
|
+
"kafka-python==3.0.10",
|
|
18
18
|
"langchain==1.3.14",
|
|
19
19
|
"langchain-core==1.5.3",
|
|
20
20
|
"langchain-openai==1.4.1",
|
{sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/deep_agent.py
RENAMED
|
@@ -160,6 +160,10 @@ class AgentConfig(BaseModel):
|
|
|
160
160
|
# (scoped 由服务端路由硬编码,user 由 MinIO 按 user 灌入)。
|
|
161
161
|
system_skills_allow: Optional[set[str]] = None
|
|
162
162
|
memory_dir: Optional[str] = None
|
|
163
|
+
# 额外 middleware(应用层注入,如技能使用上报、自定义拦截):
|
|
164
|
+
# 数字员工等项目自定义 AgentMiddleware 实例列表,create_deep_agent 会
|
|
165
|
+
# 追加到内置 middleware_list 之后执行。类型用 list 而非具体类避免循环依赖。
|
|
166
|
+
extra_middleware: list = []
|
|
163
167
|
|
|
164
168
|
@property
|
|
165
169
|
def skills_dir(self) -> Optional[str]:
|
|
@@ -1118,6 +1122,9 @@ async def create_deep_agent(
|
|
|
1118
1122
|
SkillWriteGuardMiddleware(), # 系统 /skills/system 只读守卫(先于白名单)
|
|
1119
1123
|
SandboxPathGuardMiddleware(user_id), # 宿主绝对路径规范化/拦截(防越权读他人沙箱文件)
|
|
1120
1124
|
]
|
|
1125
|
+
# 应用层注入的额外 middleware(如技能使用上报),排在内置之后
|
|
1126
|
+
if config.extra_middleware:
|
|
1127
|
+
middleware_list.extend(config.extra_middleware)
|
|
1121
1128
|
|
|
1122
1129
|
# RubricMiddleware:复用 FilesystemMiddleware 的工具(底层走 HTTPSandboxBackend HTTP 远程调用)
|
|
1123
1130
|
if config.rubric_max_iterations > 0 and sandbox_backend:
|
{sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/multi_agent_team.py
RENAMED
|
@@ -142,6 +142,8 @@ class TeamConfig(BaseModel):
|
|
|
142
142
|
|
|
143
143
|
sandbox_service_name: str = "shengye-platform-sandbox"
|
|
144
144
|
sandbox_timeout: int = 300
|
|
145
|
+
# 额外 middleware(应用层注入,如技能使用上报)
|
|
146
|
+
extra_middleware: list = []
|
|
145
147
|
# system 技能:本地仓库目录 → 同步到沙箱 /skills/system(只读)
|
|
146
148
|
system_skills_dir: Optional[str] = None
|
|
147
149
|
# user 技能:标记启用沙箱 /skills/user(可写,内容由 MinIO 灌入)
|
|
@@ -685,6 +687,8 @@ async def create_multi_agent_team(
|
|
|
685
687
|
SkillWriteGuardMiddleware(),
|
|
686
688
|
SandboxPathGuardMiddleware(user_id),
|
|
687
689
|
]
|
|
690
|
+
if config.extra_middleware:
|
|
691
|
+
middleware.extend(config.extra_middleware)
|
|
688
692
|
shared = config.shared_tools or [get_current_date]
|
|
689
693
|
|
|
690
694
|
def _build_subagent(member: TeamMember) -> CompiledSubAgent:
|
{sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/agent/sandbox/file_ops.py
RENAMED
|
@@ -389,13 +389,15 @@ class FileOperationsMixin:
|
|
|
389
389
|
)
|
|
390
390
|
# 对齐 deepagents 0.7.1 ReadResult 分页字段:服务端按行切片后回传
|
|
391
391
|
# start_line/end_line/total_lines/next_offset,框架据此渲染分页提示。
|
|
392
|
-
# no_lines_requested(limit<=0 早退):服务端返回空 content
|
|
392
|
+
# no_lines_requested(limit<=0 早退):服务端返回空 content + 该标志;
|
|
393
|
+
# 透传给 ReadResult,让 FilesystemMiddleware 区分「零行窗口」与「空文件」。
|
|
393
394
|
return ReadResult(
|
|
394
395
|
file_data=file_data,
|
|
395
396
|
start_line=result.get("start_line"),
|
|
396
397
|
end_line=result.get("end_line"),
|
|
397
398
|
total_lines=result.get("total_lines"),
|
|
398
399
|
next_offset=result.get("next_offset"),
|
|
400
|
+
no_lines_requested=bool(result.get("no_lines_requested")),
|
|
399
401
|
)
|
|
400
402
|
except Exception as e:
|
|
401
403
|
SYLogger.error(f"[Sandbox] 读取文件异常: {e}")
|
|
@@ -471,12 +473,14 @@ class FileOperationsMixin:
|
|
|
471
473
|
encoding=encoding,
|
|
472
474
|
)
|
|
473
475
|
# 对齐 deepagents 0.7.1 ReadResult 分页字段(与同步 read 一致)。
|
|
476
|
+
# no_lines_requested 透传:区分零行窗口与空文件(见同步版注释)。
|
|
474
477
|
return ReadResult(
|
|
475
478
|
file_data=file_data,
|
|
476
479
|
start_line=result.get("start_line"),
|
|
477
480
|
end_line=result.get("end_line"),
|
|
478
481
|
total_lines=result.get("total_lines"),
|
|
479
482
|
next_offset=result.get("next_offset"),
|
|
483
|
+
no_lines_requested=bool(result.get("no_lines_requested")),
|
|
480
484
|
)
|
|
481
485
|
except Exception as e:
|
|
482
486
|
SYLogger.error(f"[Sandbox] 异步读取文件异常: {e}")
|
|
@@ -60,8 +60,8 @@ class FileDownloadResult:
|
|
|
60
60
|
from sycommon.logging.kafka_log import SYLogger
|
|
61
61
|
from sycommon.agent.sandbox.file_ops import FileOperationsMixin, SANDBOX_API_PREFIX
|
|
62
62
|
|
|
63
|
+
from deepagents.backends.sandbox import BaseSandbox
|
|
63
64
|
from deepagents.backends.protocol import (
|
|
64
|
-
SandboxBackendProtocol,
|
|
65
65
|
ExecuteResponse,
|
|
66
66
|
FileDownloadResponse,
|
|
67
67
|
FileUploadResponse,
|
|
@@ -219,10 +219,24 @@ def filter_instances_by_owner(instances: list, user_id: str, timeout: float = 3.
|
|
|
219
219
|
return filtered
|
|
220
220
|
|
|
221
221
|
|
|
222
|
-
class HTTPSandboxBackend(FileOperationsMixin,
|
|
222
|
+
class HTTPSandboxBackend(FileOperationsMixin, BaseSandbox):
|
|
223
223
|
"""
|
|
224
224
|
通过 HTTP API 连接远程沙箱容器
|
|
225
225
|
|
|
226
|
+
继承 BaseSandbox(而非 SandboxBackendProtocol)以解锁 deepagents
|
|
227
|
+
capture-at-source offload:execute 大输出在沙箱源端截成 head/tail 预览,
|
|
228
|
+
完整结果落盘 /large_tool_results/<tool_call_id>,模型可经 read_file 翻页恢复,
|
|
229
|
+
不必重跑命令。落盘目录由 SandboxRecoveryManager/minio_sync cleanup 兜底清理。
|
|
230
|
+
FileOperationsMixin 在 MRO 最前,read/ls/grep/edit/delete 等仍走本类自定义
|
|
231
|
+
实现(HTTP 远程调用),BaseSandbox 的 shell 默认实现不会被触发。
|
|
232
|
+
"""
|
|
233
|
+
|
|
234
|
+
# capture-at-source offload:opt-in,依赖沙箱镜像含 POSIX sh + head/tail/wc/cat。
|
|
235
|
+
# 生产 Linux 沙箱走 bash heredoc 执行命令(见 _build_execute_command),必然满足。
|
|
236
|
+
enable_capture_offload = True
|
|
237
|
+
|
|
238
|
+
"""
|
|
239
|
+
|
|
226
240
|
支持两种模式:
|
|
227
241
|
1. 直接 URL: 直接指定沙箱服务地址
|
|
228
242
|
2. Nacos 服务发现: 通过服务名从 Nacos 获取实例(支持自动故障转移)
|
|
@@ -114,6 +114,30 @@ class Config(metaclass=SingletonMeta):
|
|
|
114
114
|
return es
|
|
115
115
|
raise ValueError(f"No configuration found for elasticsearch: {name}")
|
|
116
116
|
|
|
117
|
+
# 命名空间 → 默认租户 ID:prod/wsuat1 共享同一租户,其余环境另一租户
|
|
118
|
+
_PROD_NAMESPACES = ("prod", "wsuat1")
|
|
119
|
+
_DEFAULT_TENANT_PROD = "T000002"
|
|
120
|
+
_DEFAULT_TENANT_OTHER = "T000003"
|
|
121
|
+
|
|
122
|
+
def get_namespace_id(self, default=''):
|
|
123
|
+
"""获取当前环境标识(Nacos namespaceId,如 'prod'/'wsuat1'/'dev')。
|
|
124
|
+
|
|
125
|
+
Args:
|
|
126
|
+
default: 配置缺失时的默认值,按调用场景传入:
|
|
127
|
+
告警展示用 '未知环境',功能判断用 'dev'/'prod',缓存哨兵用 None。
|
|
128
|
+
"""
|
|
129
|
+
return self.config.get('Nacos', {}).get('namespaceId', default)
|
|
130
|
+
|
|
131
|
+
def get_tenant_id(self):
|
|
132
|
+
"""根据当前环境推导系统默认租户 ID。
|
|
133
|
+
|
|
134
|
+
prod / wsuat1 → "T000002",其余环境 → "T000003"。
|
|
135
|
+
仅作为系统内部消息(如 RabbitMQ SYSTEM 消息)的兜底默认值;
|
|
136
|
+
若调用方有请求上下文中的真实租户(x-tenant-header),应优先使用它。
|
|
137
|
+
"""
|
|
138
|
+
ns = self.get_namespace_id()
|
|
139
|
+
return self._DEFAULT_TENANT_PROD if ns in self._PROD_NAMESPACES else self._DEFAULT_TENANT_OTHER
|
|
140
|
+
|
|
117
141
|
def _process_config(self):
|
|
118
142
|
# 清空列表,防止 set_attr 多次调用时重复累积
|
|
119
143
|
self.llm_configs.clear()
|
|
@@ -29,12 +29,47 @@ def _is_retryable_tx_error(exc: Exception) -> bool:
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
class AsyncBaseDBService(metaclass=SingletonMeta):
|
|
32
|
-
"""数据库操作基础服务类,封装异步会话管理功能
|
|
32
|
+
"""数据库操作基础服务类,封装异步会话管理功能
|
|
33
|
+
|
|
34
|
+
engine 不在 __init__ 时绑定,而是每次 session 时按当前 event loop 动态
|
|
35
|
+
获取(AsyncDatabaseService.engine() 按 loop 隔离)。这样子类即使作为
|
|
36
|
+
模块级单例在 import 时实例化(此时 DB 未初始化、loop 未确定),也不会
|
|
37
|
+
把 engine 绑死在错误的时机/loop 上;后台线程在独立 loop 调用时同样能
|
|
38
|
+
拿到本 loop 的连接池。
|
|
39
|
+
"""
|
|
33
40
|
|
|
34
41
|
def __init__(self):
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
42
|
+
# 不缓存 engine/Session,延迟到每次使用时按当前 loop 创建,
|
|
43
|
+
# 见 _session_factory()。保留 engine 只读属性兼容旧子类(见下)。
|
|
44
|
+
pass
|
|
45
|
+
|
|
46
|
+
@property
|
|
47
|
+
def engine(self):
|
|
48
|
+
"""当前 loop 的 engine(兼容旧子类直接访问 self.engine 的写法)
|
|
49
|
+
|
|
50
|
+
注意:仅在调试/日志场景使用;正式会话请走 session()/execute(),
|
|
51
|
+
不要把返回的 engine 跨 loop 缓存复用。
|
|
52
|
+
"""
|
|
53
|
+
return AsyncDatabaseService.engine()
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
def Session(self) -> async_sessionmaker:
|
|
57
|
+
"""当前 loop 的会话工厂(兼容旧子类直接访问 self.Session 的写法)
|
|
58
|
+
|
|
59
|
+
用法与旧版一致:`async with self.Session() as session: ...`
|
|
60
|
+
但每次访问都按当前 loop 重新构建,不要将其返回值跨 loop 缓存。
|
|
61
|
+
"""
|
|
62
|
+
return self._session_factory()
|
|
63
|
+
|
|
64
|
+
def _session_factory(self) -> async_sessionmaker:
|
|
65
|
+
"""按当前 loop 创建会话工厂(engine 由 AsyncDatabaseService 按 loop 提供)"""
|
|
66
|
+
engine = AsyncDatabaseService.engine()
|
|
67
|
+
if engine is None:
|
|
68
|
+
raise RuntimeError(
|
|
69
|
+
"数据库未初始化:AsyncDatabaseService.engine() 返回 None,"
|
|
70
|
+
"请先通过 Services.plugins(database_service=...) 完成初始化")
|
|
71
|
+
return async_sessionmaker(
|
|
72
|
+
bind=engine,
|
|
38
73
|
class_=AsyncSession,
|
|
39
74
|
expire_on_commit=False
|
|
40
75
|
)
|
|
@@ -45,7 +80,7 @@ class AsyncBaseDBService(metaclass=SingletonMeta):
|
|
|
45
80
|
异步数据库会话上下文管理器
|
|
46
81
|
自动处理会话的创建、提交、回滚和关闭
|
|
47
82
|
"""
|
|
48
|
-
async with self.
|
|
83
|
+
async with self._session_factory()() as session:
|
|
49
84
|
try:
|
|
50
85
|
yield session
|
|
51
86
|
await session.commit()
|
|
@@ -81,7 +116,7 @@ class AsyncBaseDBService(metaclass=SingletonMeta):
|
|
|
81
116
|
last_exc = None
|
|
82
117
|
|
|
83
118
|
while True:
|
|
84
|
-
async with self.
|
|
119
|
+
async with self._session_factory()() as session:
|
|
85
120
|
try:
|
|
86
121
|
result = await fn(session)
|
|
87
122
|
await session.commit()
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from sqlalchemy.ext.asyncio import create_async_engine, AsyncSession
|
|
2
2
|
from sqlalchemy import text, event
|
|
3
|
+
import asyncio
|
|
3
4
|
|
|
4
5
|
from sycommon.config.Config import SingletonMeta
|
|
5
6
|
from sycommon.config.DatabaseConfig import DatabaseConfig, convert_dict_keys
|
|
@@ -9,7 +10,19 @@ from sycommon.synacos.nacos_service import NacosService
|
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
class AsyncDatabaseService(metaclass=SingletonMeta):
|
|
12
|
-
|
|
13
|
+
# 按 event loop 隔离的 engine 池:{loop: AsyncEngine}
|
|
14
|
+
#
|
|
15
|
+
# 为什么不是全局单 engine:aiomysql 连接的 socket stream 在首次读写时
|
|
16
|
+
# 绑定到当时的 event loop,跨 loop 复用会抛
|
|
17
|
+
# "got Future attached to a different loop"。
|
|
18
|
+
# 业务服务的后台线程(如定时刷盘)通常跑在独立 loop,必须各用各的连接。
|
|
19
|
+
#
|
|
20
|
+
# 兼容:engine() 保持无参,自动按"当前 running loop"返回对应 engine;
|
|
21
|
+
# 主 loop(setup_database 所在)返回初始化的那个,其他 loop 首次访问时
|
|
22
|
+
# 按同一份配置懒创建。单 loop 项目行为与之前完全一致。
|
|
23
|
+
_engines: dict = {}
|
|
24
|
+
_main_loop = None # setup_database 时的 loop
|
|
25
|
+
_db_config = None # DatabaseConfig,供其他 loop 懒建 engine
|
|
13
26
|
# setup 时记录入参,供 reload() 重建使用
|
|
14
27
|
_setup_args = None
|
|
15
28
|
|
|
@@ -24,8 +37,15 @@ class AsyncDatabaseService(metaclass=SingletonMeta):
|
|
|
24
37
|
# 初始化 DatabaseConnector (传入配置)
|
|
25
38
|
connector = AsyncDatabaseConnector(db_config)
|
|
26
39
|
|
|
27
|
-
#
|
|
28
|
-
|
|
40
|
+
# 记录主 loop 与其 engine
|
|
41
|
+
try:
|
|
42
|
+
AsyncDatabaseService._main_loop = asyncio.get_running_loop()
|
|
43
|
+
except RuntimeError:
|
|
44
|
+
AsyncDatabaseService._main_loop = None
|
|
45
|
+
AsyncDatabaseService._db_config = db_config
|
|
46
|
+
AsyncDatabaseService._engines = {
|
|
47
|
+
AsyncDatabaseService._main_loop: connector.engine
|
|
48
|
+
}
|
|
29
49
|
|
|
30
50
|
# 执行异步测试连接
|
|
31
51
|
if not await connector.test_connection():
|
|
@@ -39,43 +59,90 @@ class AsyncDatabaseService(metaclass=SingletonMeta):
|
|
|
39
59
|
|
|
40
60
|
@staticmethod
|
|
41
61
|
def engine():
|
|
42
|
-
|
|
62
|
+
"""返回当前 running loop 对应的 engine。
|
|
63
|
+
|
|
64
|
+
主 loop 返回初始化的共享 engine;其他 loop(后台线程)首次调用时
|
|
65
|
+
按同一份数据库配置懒创建独立 engine(连接归该 loop 专用)。
|
|
66
|
+
无 running loop(纯同步上下文)时回退主 engine。
|
|
67
|
+
"""
|
|
68
|
+
try:
|
|
69
|
+
loop = asyncio.get_running_loop()
|
|
70
|
+
except RuntimeError:
|
|
71
|
+
# 同步上下文(如 ORM 事件回调、脚本),回退主 engine
|
|
72
|
+
return AsyncDatabaseService._engines.get(
|
|
73
|
+
AsyncDatabaseService._main_loop)
|
|
74
|
+
|
|
75
|
+
if loop in AsyncDatabaseService._engines:
|
|
76
|
+
return AsyncDatabaseService._engines[loop]
|
|
77
|
+
|
|
78
|
+
# 其他 loop 首次访问:懒建专属 engine
|
|
79
|
+
if AsyncDatabaseService._db_config is None:
|
|
80
|
+
return None
|
|
81
|
+
engine = AsyncDatabaseService._build_engine()
|
|
82
|
+
AsyncDatabaseService._engines[loop] = engine
|
|
83
|
+
return engine
|
|
84
|
+
|
|
85
|
+
@staticmethod
|
|
86
|
+
def _build_engine():
|
|
87
|
+
"""按当前 running loop 创建 engine(内部使用)"""
|
|
88
|
+
connector = AsyncDatabaseConnector(AsyncDatabaseService._db_config)
|
|
89
|
+
SYLogger.info(
|
|
90
|
+
f"AsyncDatabaseService 为非主 loop 创建独立 engine "
|
|
91
|
+
f"(共 {len(AsyncDatabaseService._engines) + 1} 个)")
|
|
92
|
+
return connector.engine
|
|
43
93
|
|
|
44
94
|
@staticmethod
|
|
45
95
|
async def dispose() -> None:
|
|
46
|
-
"""
|
|
47
|
-
|
|
96
|
+
"""释放所有 engine 的连接池资源(在各 loop 内安全地尽力释放)"""
|
|
97
|
+
engines = list(AsyncDatabaseService._engines.values())
|
|
98
|
+
AsyncDatabaseService._engines = {}
|
|
99
|
+
AsyncDatabaseService._main_loop = None
|
|
100
|
+
for engine in engines:
|
|
101
|
+
if engine is None:
|
|
102
|
+
continue
|
|
48
103
|
try:
|
|
49
|
-
|
|
104
|
+
# dispose 是协程但内部只做连接关闭,跨 loop 调用对
|
|
105
|
+
# 空闲连接安全;忙碌连接的 loop 此时应已停止
|
|
106
|
+
await engine.dispose()
|
|
50
107
|
except Exception as e:
|
|
51
108
|
SYLogger.error(f"AsyncDatabase engine dispose error: {e}")
|
|
52
|
-
finally:
|
|
53
|
-
AsyncDatabaseService._engine = None
|
|
54
109
|
|
|
55
110
|
@classmethod
|
|
56
111
|
async def reload(cls) -> None:
|
|
57
112
|
"""配置热更新:dispose 旧引擎并按最新配置重建,失败回退。"""
|
|
58
113
|
if not cls._setup_args:
|
|
59
114
|
return
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
from sycommon.config.Config import SingletonMeta
|
|
63
|
-
SingletonMeta._instances.pop(AsyncDatabaseConnector, None)
|
|
115
|
+
old_engines = dict(cls._engines)
|
|
116
|
+
old_main_loop = cls._main_loop
|
|
64
117
|
try:
|
|
65
118
|
await cls.setup_database(*cls._setup_args)
|
|
66
119
|
except Exception as e:
|
|
67
120
|
SYLogger.error(f"AsyncDatabaseService reload 重建失败: {e}", exc_info=True)
|
|
68
|
-
cls.
|
|
121
|
+
cls._engines = old_engines
|
|
122
|
+
cls._main_loop = old_main_loop
|
|
69
123
|
return
|
|
70
|
-
# 新 engine
|
|
71
|
-
|
|
124
|
+
# 新 engine 建好,释放旧的(含其他 loop 的,其连接已失效,
|
|
125
|
+
# 下次访问会按新 _db_config 自动重建)
|
|
126
|
+
for loop, old_engine in old_engines.items():
|
|
127
|
+
if old_engine is None:
|
|
128
|
+
continue
|
|
72
129
|
try:
|
|
73
130
|
await old_engine.dispose()
|
|
74
131
|
except Exception as e:
|
|
75
132
|
SYLogger.error(f"AsyncDatabaseService reload 释放旧 engine 失败: {e}")
|
|
76
133
|
|
|
77
134
|
|
|
78
|
-
class AsyncDatabaseConnector
|
|
135
|
+
class AsyncDatabaseConnector:
|
|
136
|
+
"""数据库连接器(每次实例化都新建 engine)
|
|
137
|
+
|
|
138
|
+
不能用 SingletonMeta:AsyncDatabaseService 按 event loop 隔离 engine,
|
|
139
|
+
需要为每个 loop 各建一个连接池;单例会让所有 loop 拿到同一个 engine,
|
|
140
|
+
跨 loop 使用必抛 "attached to a different loop"。
|
|
141
|
+
|
|
142
|
+
注意:reload() 原本靠 `SingletonMeta._instances.pop(AsyncDatabaseConnector)`
|
|
143
|
+
清缓存强制重建——去掉单例后每次实例化本身就是全新 engine,无需再清。
|
|
144
|
+
"""
|
|
145
|
+
|
|
79
146
|
def __init__(self, db_config: DatabaseConfig):
|
|
80
147
|
# 从 DatabaseConfig 中提取数据库连接信息
|
|
81
148
|
self.db_user = db_config.username
|
{sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/llm/sy_langfuse.py
RENAMED
|
@@ -48,7 +48,7 @@ class LangfuseInitializer(metaclass=SingletonMeta):
|
|
|
48
48
|
|
|
49
49
|
server_name = config_dict.get('Name', '')
|
|
50
50
|
langfuse_configs = config_dict.get('LangfuseConfig', [])
|
|
51
|
-
environment =
|
|
51
|
+
environment = Config().get_namespace_id('')
|
|
52
52
|
|
|
53
53
|
# 3. 查找匹配的配置项
|
|
54
54
|
target_config = next(
|
|
@@ -134,7 +134,7 @@ class TokenUsageMySQLService(metaclass=SingletonMeta):
|
|
|
134
134
|
f"TokenUsageMySQLService 加载 service_name: {cls._service_name}")
|
|
135
135
|
|
|
136
136
|
if cls._system_env is None:
|
|
137
|
-
env =
|
|
137
|
+
env = Config().get_namespace_id(None)
|
|
138
138
|
if env:
|
|
139
139
|
cls._system_env = env
|
|
140
140
|
logging.info(
|
{sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/logging/kafka_log.py
RENAMED
|
@@ -236,7 +236,7 @@ class KafkaSink:
|
|
|
236
236
|
"tenantId": "",
|
|
237
237
|
"userId": "",
|
|
238
238
|
"customerId": "",
|
|
239
|
-
"env": Config().
|
|
239
|
+
"env": Config().get_namespace_id(''),
|
|
240
240
|
"priReqSource": "",
|
|
241
241
|
"reqSource": "",
|
|
242
242
|
"serviceId": self.service_id,
|
{sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/middleware/sandbox.py
RENAMED
|
@@ -340,6 +340,10 @@ _GREP_TIMEOUT = 60
|
|
|
340
340
|
# read 文本路径服务端字节上限(对齐 deepagents _READ_COMMAND_TEMPLATE 的
|
|
341
341
|
# MAX_OUTPUT_BYTES=500KiB):超大文本文件不会把整包塞进 HTTP 响应/内存。
|
|
342
342
|
_READ_MAX_OUTPUT_BYTES = 500 * 1024
|
|
343
|
+
# read 提前停止后补数 total_lines 的文件大小闸门(对齐 deepagents sandbox.py:499
|
|
344
|
+
# MAX_LINE_COUNT_BYTES=1MiB):超过此大小的文件不数总行数(total_lines=None),
|
|
345
|
+
# 避免 GB 级文件的逐行计数把 read 拖成慢操作。
|
|
346
|
+
_READ_TOTAL_LINE_MAX_BYTES = 1024 * 1024
|
|
343
347
|
# 默认工作目录配置
|
|
344
348
|
# - Linux: /data/sycommon_sandbox (固定路径,自动创建)
|
|
345
349
|
# - macOS/Windows: 使用系统临时目录
|
|
@@ -1027,8 +1031,10 @@ def setup_sandbox_handler(app: FastAPI, config: dict = None):
|
|
|
1027
1031
|
|
|
1028
1032
|
# limit<=0:协议 no_lines_requested —— 不读文件,返回空内容 + 标志位,
|
|
1029
1033
|
# 不带任何分页字段(客户端填 ReadResult.no_lines_requested=True)。
|
|
1034
|
+
# 对齐 deepagents _build_read_cmd 的 limit<=0 早退分支。区别于空文件
|
|
1035
|
+
# (空文件走上面的 "File exists but has empty contents" 提示)。
|
|
1030
1036
|
if limit is not None and limit <= 0:
|
|
1031
|
-
return ReadResponse(content="", error=None, encoding="utf-8")
|
|
1037
|
+
return ReadResponse(content="", error=None, encoding="utf-8", no_lines_requested=True)
|
|
1032
1038
|
|
|
1033
1039
|
lines = []
|
|
1034
1040
|
lines_read = 0
|
|
@@ -1082,12 +1088,18 @@ def setup_sandbox_handler(app: FastAPI, config: dict = None):
|
|
|
1082
1088
|
next_offset = None
|
|
1083
1089
|
else:
|
|
1084
1090
|
# 提前停止(limit 到顶 / 字节截断):需要 total_lines 才能算「剩余」。
|
|
1085
|
-
#
|
|
1086
|
-
# (对齐 deepagents
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
+
# 大文件全量计数代价高——先比 st_size 与 _READ_TOTAL_LINE_MAX_BYTES
|
|
1092
|
+
# (对齐 deepagents sandbox.py:499 的 MAX_LINE_COUNT_BYTES=1MiB 闸门),
|
|
1093
|
+
# 超过则不数(返回 None,next_offset 退化为 end_line),避免无界扫描
|
|
1094
|
+
# 把 read 变成对 GB 级文件的逐行计数慢操作。
|
|
1095
|
+
file_size = os.path.getsize(file_path)
|
|
1096
|
+
if file_size <= _READ_TOTAL_LINE_MAX_BYTES:
|
|
1097
|
+
try:
|
|
1098
|
+
with open(file_path, 'r', encoding='utf-8', newline=None) as f:
|
|
1099
|
+
total_lines = sum(1 for _ in f)
|
|
1100
|
+
except OSError:
|
|
1101
|
+
total_lines = None
|
|
1102
|
+
else:
|
|
1091
1103
|
total_lines = None
|
|
1092
1104
|
# next_offset = end_line(0-indexed 下一行 = 1-indexed 末行号),
|
|
1093
1105
|
# 仅当确实还有后续行时设置;否则视为读到末尾。
|
|
@@ -1724,19 +1736,65 @@ def setup_sandbox_handler(app: FastAPI, config: dict = None):
|
|
|
1724
1736
|
grep_opts = "-rHnFZ" if use_null_separator else "-rHnF"
|
|
1725
1737
|
|
|
1726
1738
|
# 安全处理 glob_pattern,使用 shlex.quote 防止命令注入
|
|
1727
|
-
glob_pattern = f"--include={shlex.quote(req.glob)}" if req.glob else ""
|
|
1728
1739
|
pattern_escaped = shlex.quote(req.pattern)
|
|
1729
1740
|
|
|
1730
|
-
#
|
|
1731
|
-
|
|
1741
|
+
# glob 含 '/'(如 src/**/*.py)时,GNU grep --include 只匹配 basename,
|
|
1742
|
+
# 会静默返回 0 条(对齐 deepagents sandbox.py:684 _build_grep_cmd 的判定)。
|
|
1743
|
+
# 这种路径 glob 改走 Python glob 预筛文件清单 + grep -F 逐文件/批量,
|
|
1744
|
+
# 避免「带路径 glob 搜不到东西」的隐蔽 bug。
|
|
1745
|
+
path_glob = req.glob
|
|
1746
|
+
use_path_glob = bool(path_glob and "/" in path_glob)
|
|
1747
|
+
if not use_path_glob:
|
|
1748
|
+
glob_pattern = f"--include={shlex.quote(req.glob)}" if req.glob else ""
|
|
1749
|
+
# 注意:不再用 2>/dev/null || true,以便捕获 stderr 用于错误诊断
|
|
1750
|
+
cmd = f"grep {grep_opts} {glob_pattern} -e {pattern_escaped} {quoted_path}"
|
|
1751
|
+
else:
|
|
1752
|
+
glob_pattern = "" # 不用 --include;文件清单由 Python glob 预筛后喂给 grep
|
|
1753
|
+
|
|
1732
1754
|
# 对齐 deepagents 0.7.1 max_count:服务端用 head 早停,多取 1 条用于判断是否截断。
|
|
1733
1755
|
# (grep -r 没有真正的全局计数上限,head -n N+1 截 stdout 后,客户端按 N 裁剪、
|
|
1734
1756
|
# 超过即 truncated=True。与 deepagents BaseSandbox._build_grep_cmd 同款思路。)
|
|
1735
1757
|
max_count = req.max_count
|
|
1736
|
-
if max_count is not None and max_count >= 0:
|
|
1758
|
+
if not use_path_glob and max_count is not None and max_count >= 0:
|
|
1737
1759
|
# || true 兜底 SIGPIPE(head 读够后关闭管道,grep 收到 SIGPIPE 退出码非 0)
|
|
1738
1760
|
cmd = f"{cmd} | head -n {int(max_count) + 1} || true"
|
|
1739
1761
|
|
|
1762
|
+
# 含路径 glob 的分支:Python glob 预筛出匹配文件清单(仅文件,递归),
|
|
1763
|
+
# 经 xargs 批量喂给 grep -F。沿用 -Z/-Hn 与正文相同的 NUL/冒号解析,故
|
|
1764
|
+
# 下游 _parse_grep_results 无需改动。文件清单为空时直接返回 0 条,避免起
|
|
1765
|
+
# `grep -e pat`(无文件参数)误把 stdin 当搜索源。
|
|
1766
|
+
def _resolve_path_glob_files():
|
|
1767
|
+
import glob as glob_module
|
|
1768
|
+
full_pattern = os.path.join(search_path, path_glob)
|
|
1769
|
+
try:
|
|
1770
|
+
files = sorted(glob_module.glob(full_pattern, recursive=True))
|
|
1771
|
+
except (FileNotFoundError, NotADirectoryError, PermissionError) as e:
|
|
1772
|
+
SYLogger.warning(f"[Sandbox Server] grep 路径 glob 异常: {e}")
|
|
1773
|
+
return []
|
|
1774
|
+
workspace_resolved_g = os.path.realpath(workspace)
|
|
1775
|
+
safe = []
|
|
1776
|
+
for m in files:
|
|
1777
|
+
if os.path.isdir(m):
|
|
1778
|
+
continue # grep 按文件搜,目录跳过
|
|
1779
|
+
try:
|
|
1780
|
+
if not _is_path_within(m, workspace_resolved_g):
|
|
1781
|
+
continue
|
|
1782
|
+
except OSError:
|
|
1783
|
+
continue
|
|
1784
|
+
safe.append(m)
|
|
1785
|
+
return safe
|
|
1786
|
+
|
|
1787
|
+
if use_path_glob:
|
|
1788
|
+
path_glob_files = await asyncio.to_thread(_resolve_path_glob_files)
|
|
1789
|
+
if not path_glob_files:
|
|
1790
|
+
return GrepResponse(matches=[])
|
|
1791
|
+
# xargs -0:文件名以 NUL 分隔喂入,文件名含空格/引号/换行也安全。
|
|
1792
|
+
# find ... -print0 | grep -FZne pattern --files-from=... 也行,但 xargs 最 portable。
|
|
1793
|
+
files_argv = " ".join(shlex.quote(f) for f in path_glob_files)
|
|
1794
|
+
# 不加 -r(已显式给文件清单,无需递归);保留 -H(始终带文件名) -n(行号) -F(字面量) -Z(NUL)。
|
|
1795
|
+
path_glob_grep_opts = "-HnFZ" if use_null_separator else "-HnF"
|
|
1796
|
+
cmd = f"printf '%s\\0' {files_argv} | xargs -0 grep {path_glob_grep_opts} -e {pattern_escaped}"
|
|
1797
|
+
|
|
1740
1798
|
# 使用 asyncio.create_subprocess_shell 异步执行
|
|
1741
1799
|
proc = await asyncio.create_subprocess_shell(
|
|
1742
1800
|
cmd,
|
|
@@ -1831,6 +1889,7 @@ def setup_sandbox_handler(app: FastAPI, config: dict = None):
|
|
|
1831
1889
|
|
|
1832
1890
|
matches = await asyncio.to_thread(_parse_grep_results)
|
|
1833
1891
|
# 对齐 deepagents 0.7.1:超出 max_count 即置 truncated(多取的 1 条在这里裁掉)。
|
|
1892
|
+
# 路径 glob 分支没在服务端 head 早停(直接 grep 文件清单),这里统一兜底裁剪。
|
|
1834
1893
|
truncated = False
|
|
1835
1894
|
if max_count is not None and len(matches) > max_count:
|
|
1836
1895
|
matches = matches[:max_count]
|
{sycommon_python_lib-0.2.7a56 → sycommon_python_lib-0.2.8a1}/src/sycommon/models/base_http.py
RENAMED
|
@@ -99,3 +99,55 @@ def error_content(
|
|
|
99
99
|
) -> dict:
|
|
100
100
|
"""构建错误响应内容字典,支持自定义错误码"""
|
|
101
101
|
return build_response_content(data=data, code=code, message=message)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
# =====================================================================
|
|
105
|
+
# HTTP 语义响应(新方式,推荐使用)
|
|
106
|
+
#
|
|
107
|
+
# 与上面 0/1 业务码的区别:code 直接用 HTTP 状态码语义——
|
|
108
|
+
# 成功 code=200 / 失败 code=500,HTTP status 同步对应(200 / 500),
|
|
109
|
+
# success 由 code 是否为 2xx 推导。不再用 0/1 代表成功失败。
|
|
110
|
+
# 旧函数保留兼容,新项目请用 ok() / fail()。
|
|
111
|
+
# =====================================================================
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def http_response(
|
|
115
|
+
data: T | Any = None,
|
|
116
|
+
code: int = status.HTTP_200_OK,
|
|
117
|
+
message: str = None,
|
|
118
|
+
) -> JSONResponse:
|
|
119
|
+
"""按 HTTP 状态码语义构建响应,code 即业务码也是 HTTP status。
|
|
120
|
+
|
|
121
|
+
success 自动按 code 是否为 2xx 推导。
|
|
122
|
+
"""
|
|
123
|
+
content = BaseResponseModel(
|
|
124
|
+
code=code,
|
|
125
|
+
message=message,
|
|
126
|
+
success=200 <= code < 300,
|
|
127
|
+
data=data,
|
|
128
|
+
)
|
|
129
|
+
if isinstance(content.data, BaseModel):
|
|
130
|
+
body = {
|
|
131
|
+
"code": content.code,
|
|
132
|
+
"message": content.message,
|
|
133
|
+
"success": content.success,
|
|
134
|
+
"data": content.data.model_dump(),
|
|
135
|
+
}
|
|
136
|
+
else:
|
|
137
|
+
body = content.model_dump()
|
|
138
|
+
return JSONResponse(content=body, status_code=code)
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
def ok(data: T | Any = None, message: str = None) -> JSONResponse:
|
|
142
|
+
"""成功响应:code=200, success=true, HTTP 200"""
|
|
143
|
+
return http_response(data=data, code=status.HTTP_200_OK, message=message)
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
def fail(
|
|
147
|
+
message: str = None,
|
|
148
|
+
data: T | Any = None,
|
|
149
|
+
code: int = status.HTTP_500_INTERNAL_SERVER_ERROR,
|
|
150
|
+
) -> JSONResponse:
|
|
151
|
+
"""失败响应:默认 code=500, success=false, HTTP 500(可用 code 覆盖)"""
|
|
152
|
+
return http_response(data=data, code=code, message=message)
|
|
153
|
+
|
|
@@ -143,6 +143,11 @@ class ReadResponse(BaseModel):
|
|
|
143
143
|
end_line: Optional[int] = None
|
|
144
144
|
total_lines: Optional[int] = None
|
|
145
145
|
next_offset: Optional[int] = None
|
|
146
|
+
# limit<=0 早退标志(对齐 deepagents ReadResult.no_lines_requested):
|
|
147
|
+
# True 表示「文件未检视、零行窗口」,与「空文件」区分开。客户端据此
|
|
148
|
+
# 填 ReadResult.no_lines_requested,让 FilesystemMiddleware 给出与框架
|
|
149
|
+
# 合成实现一致的分页提示(NO_LINES_REQUESTED_WARNING)而非空文件提示。
|
|
150
|
+
no_lines_requested: bool = False
|
|
146
151
|
|
|
147
152
|
|
|
148
153
|
class WriteRequest(BaseModel):
|