sycommon-python-lib 0.2.6a11__tar.gz → 0.2.6a13__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.6a11 → sycommon_python_lib-0.2.6a13}/PKG-INFO +5 -5
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/pyproject.toml +5 -5
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/deep_agent.py +6 -73
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/sandbox/minio_sync.py +13 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/auth/wecom_ldap_service.py +13 -0
- sycommon_python_lib-0.2.6a13/src/sycommon/config/config_change_notifier.py +171 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/database/async_database_service.py +41 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/database/database_service.py +36 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/database/elasticsearch_service.py +27 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/database/pg_checkpoint_service.py +25 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/database/redis_service.py +21 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/database/token_usage_db_service.py +42 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/embedding.py +15 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/llm_logger.py +8 -3
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/sy_langfuse.py +20 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/logging/async_sql_logger.py +4 -16
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/logging/kafka_log.py +27 -2
- sycommon_python_lib-0.2.6a13/src/sycommon/logging/log_masker.py +337 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/logging/sql_logger.py +3 -14
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/middleware/traceid.py +4 -1
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/notice/wecom_message.py +10 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/rabbitmq/rabbitmq_service_core.py +40 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/services.py +8 -9
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/synacos/nacos_config_manager.py +7 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/xxljob/xxljob_service.py +20 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon_python_lib.egg-info/PKG-INFO +5 -5
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon_python_lib.egg-info/SOURCES.txt +5 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon_python_lib.egg-info/requires.txt +4 -4
- sycommon_python_lib-0.2.6a13/tests/test_config_change_notifier.py +168 -0
- sycommon_python_lib-0.2.6a13/tests/test_hotreload_snapshot.py +223 -0
- sycommon_python_lib-0.2.6a13/tests/test_log_masker.py +255 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/README.md +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/setup.cfg +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/cli.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/core/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/core/console.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/core/models.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/core/project.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/core/utils.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/agent/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/agent/main_agent.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/agent/nodes/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/agent/nodes/example_node.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/agent/states/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/agent/states/agent_state.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/api/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/api/query.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/api/sse/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/api/sse/agent.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/db/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/db/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/db/model/entity.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/db/service.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/model/parse.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/tools/mq.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/base/.env.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/base/.gitignore.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/base/Dockerfile.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/base/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/base/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/base/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/base/app.yaml.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/base/client/FileServiceClient.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/base/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/base/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/base/model/file_info.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/base/requirements.txt.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/cli/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/cli/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/cli/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/cli/commands/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/cli/commands/hello.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/cli/pyproject.toml.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/cli/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/web/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/web/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/web/api/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/web/api/echo.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/web/api/sse/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/web/api/sse/echo.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/web/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/web/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/web/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/web/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/command/templates/web/tools/mq.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/nexus/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/__main__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/acp/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/acp/config.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/acp/executor.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/acp/registry.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/acp/server.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/agents/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/agents/factory.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/agents/prompts.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/cdp/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/cdp/browser.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/cdp/capabilities/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/cdp/capabilities/console.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/cdp/capabilities/dom.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/cdp/capabilities/network.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/cdp/capabilities/page_errors.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/cdp/capabilities/performance.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/cdp/capabilities/screenshot.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/cdp/client.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/cdp/protocol.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/cdp/repl.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/cli.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/commands/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/commands/acp_cmd.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/commands/cdp_cmd.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/commands/chat_cmd.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/commands/create_cmd.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/commands/evaluate_cmd.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/commands/init_cmd.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/commands/memory_cmd.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/commands/resume_cmd.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/commands/rollback_cmd.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/commands/run_cmd.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/core/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/core/backend.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/core/config.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/core/display.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/core/git_integration.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/core/llm.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/core/state.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/evaluate/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/evaluate/api_evaluator.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/memory/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/memory/compressor.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/memory/full.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/memory/hot.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/memory/manager.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/memory/warm.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/mode/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/mode/create.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/mode/optimize.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/models/config_models.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/baseline_tests.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/checkpoint.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/convergence.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/diagnosis.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/engine.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/environment.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/experience.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/harness_prompts.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/history.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/optimization_logger.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/pre_validation.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/reward.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/strategy_bandit.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/strategy_generator.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/strategy_prompts.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycli/skills/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/agent_manager.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/chat_events.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/mcp/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/mcp/models.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/mcp/tool_loader.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/multi_agent_team.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/sandbox/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/sandbox/consistent_hash.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/sandbox/file_ops.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/sandbox/http_sandbox_backend.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/sandbox/sandbox_pool.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/sandbox/sandbox_recovery.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/sandbox/session.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/summarization_utils.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/auth/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/auth/ldap_service.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/auth/oa_cache.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/auth/oa_crypto.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/auth/oa_service.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/config/Config.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/config/DatabaseConfig.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/config/ElasticsearchConfig.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/config/EmbeddingConfig.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/config/LLMConfig.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/config/LangfuseConfig.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/config/MQConfig.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/config/PgConfig.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/config/RedisConfig.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/config/RerankerConfig.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/config/SentryConfig.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/config/XxlJobConfig.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/config/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/database/async_base_db_service.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/database/base_db_service.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/health/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/health/health_check.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/health/metrics.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/health/ping.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/heartbeat_process/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/heartbeat_process/heartbeat_config.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/heartbeat_process/heartbeat_process_manager.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/heartbeat_process/heartbeat_process_worker.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/get_llm.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/llm_tokens.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/llm_with_token_tracking.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/native_with_fallback_runnable.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/output_fixing_runnable.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/struct_token.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/tiktoken_cache/9b5ad71b2ce5302211f9c61530b329a4922fc6a4 +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/tiktoken_cache/fb374d419588a4632f3f557e76b4b70aebbca790 +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/token_usage_es_service.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/token_usage_mysql_service.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/token_utils.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/usage_token.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/logging/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/logging/logger_levels.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/logging/logger_wrapper.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/logging/process_logger.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/mcp_server/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/mcp_server/server.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/middleware/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/middleware/context.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/middleware/cors.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/middleware/docs.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/middleware/exception.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/middleware/middleware.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/middleware/monitor_memory.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/middleware/mq.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/middleware/sandbox.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/middleware/timeout.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/middleware/token_tracking.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/middleware/tool_result_truncation.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/models/base_http.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/models/log.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/models/mcp_server_config.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/models/mqlistener_config.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/models/mqmsg_model.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/models/mqsend_config.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/models/sandbox.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/models/sso_user.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/models/token_usage.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/models/token_usage_mysql.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/models/xxljob_handler_config.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/notice/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/notice/uvicorn_monitor.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/rabbitmq/process_pool_consumer.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/rabbitmq/rabbitmq_client.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/rabbitmq/rabbitmq_pool.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/rabbitmq/rabbitmq_service.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/rabbitmq/rabbitmq_service_client_manager.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/rabbitmq/rabbitmq_service_connection_monitor.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/rabbitmq/rabbitmq_service_consumer_manager.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/rabbitmq/rabbitmq_service_producer_manager.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/sentry/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/sentry/sy_sentry.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/sse/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/sse/event.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/sse/sse.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/synacos/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/synacos/example.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/synacos/example2.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/synacos/feign.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/synacos/feign_client.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/synacos/nacos_client_base.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/synacos/nacos_heartbeat_manager.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/synacos/nacos_service.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/synacos/nacos_service_discovery.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/synacos/nacos_service_registration.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/synacos/param.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/deep_agent_server.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_consistent_hash.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_consumer_loss_rootcause.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_consumer_recovery.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_deep_agent.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_dynamic_max_tokens.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_email.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_encoding_cache.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_fix_verification.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_mcp_server.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_minimax_reasoning.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_mq.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_oa_login.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_real_summarization.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_summarization_config.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_summarization_real.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_summary_leak_e2e.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/tools/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/tools/async_utils.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/tools/docs.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/tools/env.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/tools/merge_headers.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/tools/snowflake.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/tools/syemail.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/tools/timing.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/xxljob/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon_python_lib.egg-info/dependency_links.txt +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon_python_lib.egg-info/entry_points.txt +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon_python_lib.egg-info/top_level.txt +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/tests/test_asyncio_logging.py +0 -0
- {sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/tests/test_sycli.py +0 -0
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sycommon-python-lib
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.6a13
|
|
4
4
|
Summary: Add your description here
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
7
7
|
Requires-Dist: aio-pika==9.6.2
|
|
8
8
|
Requires-Dist: aiohttp==3.14.1
|
|
9
9
|
Requires-Dist: aiomysql==0.3.2
|
|
10
|
-
Requires-Dist: anyio==4.
|
|
10
|
+
Requires-Dist: anyio==4.14.0
|
|
11
11
|
Requires-Dist: decorator==5.3.1
|
|
12
12
|
Requires-Dist: deepagents==0.6.10
|
|
13
13
|
Requires-Dist: elasticsearch==9.4.1
|
|
14
|
-
Requires-Dist: fastapi==0.
|
|
14
|
+
Requires-Dist: fastapi==0.137.1
|
|
15
15
|
Requires-Dist: jinja2==3.1.6
|
|
16
16
|
Requires-Dist: kafka-python==3.0.0
|
|
17
17
|
Requires-Dist: langchain==1.3.9
|
|
18
18
|
Requires-Dist: langchain-core==1.4.7
|
|
19
19
|
Requires-Dist: langchain-openai==1.3.2
|
|
20
|
-
Requires-Dist: langfuse==4.
|
|
20
|
+
Requires-Dist: langfuse==4.8.1
|
|
21
21
|
Requires-Dist: langgraph==1.2.5
|
|
22
22
|
Requires-Dist: langgraph-checkpoint-postgres==3.1.0
|
|
23
23
|
Requires-Dist: langgraph-checkpoint-redis==0.4.1
|
|
@@ -33,7 +33,7 @@ Requires-Dist: python-multipart==0.0.32
|
|
|
33
33
|
Requires-Dist: pyyaml==6.0.3
|
|
34
34
|
Requires-Dist: redis==7.4.0
|
|
35
35
|
Requires-Dist: sentry-sdk[fastapi]==2.62.0
|
|
36
|
-
Requires-Dist: sqlalchemy[asyncio]==2.0.
|
|
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
39
|
Requires-Dist: uvicorn==0.49.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "sycommon-python-lib"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.6a13"
|
|
4
4
|
description = "Add your description here"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
@@ -8,17 +8,17 @@ dependencies = [
|
|
|
8
8
|
"aio-pika==9.6.2",
|
|
9
9
|
"aiohttp==3.14.1",
|
|
10
10
|
"aiomysql==0.3.2",
|
|
11
|
-
"anyio==4.
|
|
11
|
+
"anyio==4.14.0",
|
|
12
12
|
"decorator==5.3.1",
|
|
13
13
|
"deepagents==0.6.10",
|
|
14
14
|
"elasticsearch==9.4.1",
|
|
15
|
-
"fastapi==0.
|
|
15
|
+
"fastapi==0.137.1",
|
|
16
16
|
"jinja2==3.1.6",
|
|
17
17
|
"kafka-python==3.0.0",
|
|
18
18
|
"langchain==1.3.9",
|
|
19
19
|
"langchain-core==1.4.7",
|
|
20
20
|
"langchain-openai==1.3.2",
|
|
21
|
-
"langfuse==4.
|
|
21
|
+
"langfuse==4.8.1",
|
|
22
22
|
"langgraph==1.2.5",
|
|
23
23
|
"langgraph-checkpoint-postgres==3.1.0",
|
|
24
24
|
"langgraph-checkpoint-redis==0.4.1",
|
|
@@ -34,7 +34,7 @@ dependencies = [
|
|
|
34
34
|
"pyyaml==6.0.3",
|
|
35
35
|
"redis==7.4.0",
|
|
36
36
|
"sentry-sdk[fastapi]==2.62.0",
|
|
37
|
-
"sqlalchemy[asyncio]==2.0.
|
|
37
|
+
"sqlalchemy[asyncio]==2.0.51",
|
|
38
38
|
"starlette[full]==1.3.1",
|
|
39
39
|
"tiktoken==0.13.0",
|
|
40
40
|
"uvicorn==0.49.0",
|
{sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/deep_agent.py
RENAMED
|
@@ -1260,72 +1260,20 @@ def _parse_skill_version(content: str) -> str:
|
|
|
1260
1260
|
return ""
|
|
1261
1261
|
|
|
1262
1262
|
|
|
1263
|
-
async def _sync_skill_to_minio(
|
|
1264
|
-
minio_service,
|
|
1265
|
-
local_skill_dir: str,
|
|
1266
|
-
skill_name: str,
|
|
1267
|
-
) -> int:
|
|
1268
|
-
"""将单个技能目录上传到 MinIO(skills/{skill_name}/...)
|
|
1269
|
-
|
|
1270
|
-
Returns:
|
|
1271
|
-
成功上传的文件数量
|
|
1272
|
-
"""
|
|
1273
|
-
count = 0
|
|
1274
|
-
for root, _dirs, files in os.walk(local_skill_dir):
|
|
1275
|
-
for fname in files:
|
|
1276
|
-
fpath = os.path.join(root, fname)
|
|
1277
|
-
rel = os.path.relpath(fpath, local_skill_dir)
|
|
1278
|
-
# 统一使用 / 作为分隔符
|
|
1279
|
-
object_key = f"skills/{skill_name}/{rel.replace(os.sep, '/')}"
|
|
1280
|
-
try:
|
|
1281
|
-
content = await asyncio.to_thread(
|
|
1282
|
-
lambda p: open(p, "rb").read(), fpath)
|
|
1283
|
-
await minio_service.aupload_bytes(object_key, content)
|
|
1284
|
-
count += 1
|
|
1285
|
-
except Exception as e:
|
|
1286
|
-
SYLogger.warning(
|
|
1287
|
-
f"[MinIO] 技能文件上传失败: {object_key}, {e}")
|
|
1288
|
-
SYLogger.info(f"[MinIO] 技能 {skill_name} 同步完成: {count} 个文件")
|
|
1289
|
-
return count
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
async def _get_minio_skill_version(minio_service, skill_name: str) -> str:
|
|
1293
|
-
"""从 MinIO 全局 skills/ 路径下读取技能版本"""
|
|
1294
|
-
try:
|
|
1295
|
-
content = await asyncio.to_thread(
|
|
1296
|
-
minio_service._client.get_object,
|
|
1297
|
-
minio_service._bucket,
|
|
1298
|
-
f"skills/{skill_name}/SKILL.md",
|
|
1299
|
-
)
|
|
1300
|
-
data = content.read()
|
|
1301
|
-
content.close()
|
|
1302
|
-
return _parse_skill_version(data.decode("utf-8"))
|
|
1303
|
-
except Exception:
|
|
1304
|
-
return ""
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
1263
|
async def _sync_skills_to_sandbox(
|
|
1308
1264
|
skills_dir: str,
|
|
1309
1265
|
backend: HTTPSandboxBackend,
|
|
1310
1266
|
) -> None:
|
|
1311
|
-
"""
|
|
1267
|
+
"""同步技能目录到沙箱(按版本检查,版本不一致则全量覆盖)
|
|
1312
1268
|
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1269
|
+
技能来源是仓库内的 skills/ 目录(随部署持久,不随 Pod 重启丢失),
|
|
1270
|
+
版本比较只看沙箱 /skills/{name}/SKILL.md,无需 MinIO 锚点:
|
|
1271
|
+
- 沙箱有该技能且 version 一致 → 跳过
|
|
1272
|
+
- 沙箱没有 / version 不一致 → 从本地 skills/ 全量上传到沙箱
|
|
1317
1273
|
"""
|
|
1318
1274
|
if not os.path.isdir(skills_dir):
|
|
1319
1275
|
return
|
|
1320
1276
|
|
|
1321
|
-
try:
|
|
1322
|
-
from sycommon.agent.sandbox.minio_sync import MinioSyncService
|
|
1323
|
-
minio_available = MinioSyncService.is_available()
|
|
1324
|
-
minio_service = MinioSyncService() if minio_available else None
|
|
1325
|
-
except Exception:
|
|
1326
|
-
minio_available = False
|
|
1327
|
-
minio_service = None
|
|
1328
|
-
|
|
1329
1277
|
try:
|
|
1330
1278
|
# 获取沙箱 /skills 下已有的目录列表
|
|
1331
1279
|
existing_dirs = set()
|
|
@@ -1352,7 +1300,7 @@ async def _sync_skills_to_sandbox(
|
|
|
1352
1300
|
except Exception:
|
|
1353
1301
|
pass
|
|
1354
1302
|
|
|
1355
|
-
#
|
|
1303
|
+
# 比较版本:只从沙箱 /skills/{name}/SKILL.md 读取
|
|
1356
1304
|
remote_version = ""
|
|
1357
1305
|
if skill_name in existing_dirs:
|
|
1358
1306
|
try:
|
|
@@ -1363,22 +1311,11 @@ async def _sync_skills_to_sandbox(
|
|
|
1363
1311
|
except Exception:
|
|
1364
1312
|
pass
|
|
1365
1313
|
|
|
1366
|
-
# 沙箱无版本,尝试从 MinIO 全局 skills/ 读取
|
|
1367
|
-
if not remote_version and minio_service:
|
|
1368
|
-
remote_version = await _get_minio_skill_version(
|
|
1369
|
-
minio_service, skill_name)
|
|
1370
|
-
|
|
1371
1314
|
if remote_version and remote_version == local_version:
|
|
1372
1315
|
SYLogger.debug(
|
|
1373
1316
|
f"[DeepAgent] 技能版本一致,跳过: {skill_name} v{local_version}")
|
|
1374
1317
|
backend._synced_skills.add(skill_name)
|
|
1375
1318
|
skip_count += 1
|
|
1376
|
-
# 沙箱为空但 MinIO 有(版本一致):只恢复到沙箱,不再上传 MinIO
|
|
1377
|
-
if skill_name not in existing_dirs:
|
|
1378
|
-
await backend.async_sync_dirs(
|
|
1379
|
-
[(src, f"/skills/{skill_name}")])
|
|
1380
|
-
SYLogger.info(
|
|
1381
|
-
f"[DeepAgent] 从本地恢复技能到沙箱: {skill_name} v{local_version}")
|
|
1382
1319
|
continue
|
|
1383
1320
|
|
|
1384
1321
|
# 版本不一致或无版本,删除旧目录后全量覆盖
|
|
@@ -1399,10 +1336,6 @@ async def _sync_skills_to_sandbox(
|
|
|
1399
1336
|
SYLogger.info(
|
|
1400
1337
|
f"[DeepAgent] 全量同步技能到沙箱: {skill_name} v{local_version}")
|
|
1401
1338
|
|
|
1402
|
-
# 同步到 MinIO
|
|
1403
|
-
if minio_service:
|
|
1404
|
-
await _sync_skill_to_minio(minio_service, src, skill_name)
|
|
1405
|
-
|
|
1406
1339
|
SYLogger.info(
|
|
1407
1340
|
f"[DeepAgent] 技能同步完成: 同步 {skill_count} 个, 跳过 {skip_count} 个")
|
|
1408
1341
|
except Exception as e:
|
|
@@ -63,10 +63,23 @@ class MinioSyncService(metaclass=SingletonMeta):
|
|
|
63
63
|
instance._initialized = True
|
|
64
64
|
SYLogger.info(
|
|
65
65
|
f"[MinIO] Client initialized: {cfg['endpoint']}, bucket={instance._bucket}")
|
|
66
|
+
|
|
67
|
+
# 订阅配置热更新(幂等)
|
|
68
|
+
from sycommon.config.config_change_notifier import notifier
|
|
69
|
+
notifier.register("minio_sync", sync_cb=cls.reload)
|
|
66
70
|
except Exception as e:
|
|
67
71
|
SYLogger.error(f"[MinIO] Client initialization failed: {e}")
|
|
68
72
|
instance._initialized = False
|
|
69
73
|
|
|
74
|
+
@classmethod
|
|
75
|
+
def reload(cls) -> None:
|
|
76
|
+
"""配置热更新:清空旧 client 并按最新配置重建(setup 幂等 guard 需先置 None)。"""
|
|
77
|
+
instance = cls()
|
|
78
|
+
instance._initialized = None
|
|
79
|
+
instance._client = None
|
|
80
|
+
instance._bucket = None
|
|
81
|
+
cls.setup()
|
|
82
|
+
|
|
70
83
|
def _load_config(self, config: dict = None) -> dict:
|
|
71
84
|
"""从 Nacos 配置或环境变量加载 MinIO 配置"""
|
|
72
85
|
if config:
|
|
@@ -211,6 +211,10 @@ class WeComLDAPService(metaclass=SingletonMeta):
|
|
|
211
211
|
# 企微部门 ID -> 名称 缓存
|
|
212
212
|
self._dept_map: Dict[int, str] = {}
|
|
213
213
|
|
|
214
|
+
# 订阅配置热更新(幂等)
|
|
215
|
+
from sycommon.config.config_change_notifier import notifier
|
|
216
|
+
notifier.register("wecom_ldap", sync_cb=self.reload)
|
|
217
|
+
|
|
214
218
|
def _ensure_configs(self):
|
|
215
219
|
"""延迟加载配置"""
|
|
216
220
|
if self._wecom_config is None:
|
|
@@ -220,6 +224,15 @@ class WeComLDAPService(metaclass=SingletonMeta):
|
|
|
220
224
|
|
|
221
225
|
self._ldap_config = LDAPConfig.from_config()
|
|
222
226
|
|
|
227
|
+
def reload(self) -> None:
|
|
228
|
+
"""配置热更新:清空缓存的 WeCom/LDAP 配置及派生缓存,下次使用重新读取。"""
|
|
229
|
+
self._wecom_config = None
|
|
230
|
+
self._ldap_config = None
|
|
231
|
+
# 派生缓存(token/index/dept)按 TTL 自然过期即可,无需立即清;
|
|
232
|
+
# access_token 直接作废,避免用旧 secret 换来的 token 继续生效。
|
|
233
|
+
self._access_token = None
|
|
234
|
+
self._token_expires_at = 0
|
|
235
|
+
|
|
223
236
|
# ─── 企微 API ───
|
|
224
237
|
|
|
225
238
|
async def _get_access_token(self) -> str:
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
"""配置变更通知器(事件总线)
|
|
3
|
+
|
|
4
|
+
当 Nacos 共享配置发生变更时,NacosConfigManager._sync_to_global_config() 会先
|
|
5
|
+
把最新配置合并进全局 Config 单例,然后调用 notifier.fire() 通知所有订阅者。
|
|
6
|
+
|
|
7
|
+
设计要点:
|
|
8
|
+
- 解耦:nacos_config_manager 不直接 import 各业务单例,各单例在自己
|
|
9
|
+
init/setup 成功后调 register() 订阅自己的 reload()。
|
|
10
|
+
- 去抖:Nacos watcher 按 dataId 独立触发,短时间内多个 dataId 连续变更
|
|
11
|
+
(或同一 dataId 抖动)会被合并成一次 fan-out,避免重复 rebuild。
|
|
12
|
+
去抖窗口默认 500ms,用 threading.Timer 实现(watcher 回调跑在 Nacos
|
|
13
|
+
SDK 线程,不在 asyncio loop 里,不能用 asyncio 定时器)。
|
|
14
|
+
- sync / async 混合回调:
|
|
15
|
+
* sync_cb 直接 inline 执行。
|
|
16
|
+
* async_cb 通过 asyncio.run_coroutine_threadsafe 投递到 Services
|
|
17
|
+
捕获的主事件循环(见 Services._init_event_loop 调用 set_loop)。
|
|
18
|
+
无可用 loop 时跳过并告警(本地 dev 模式不会触发 fire,仅兜底)。
|
|
19
|
+
- 错误隔离:任一回调抛异常只记录日志,不影响其他回调,也不会冒泡
|
|
20
|
+
到 Nacos SDK 线程导致后续 watcher 失效。
|
|
21
|
+
|
|
22
|
+
典型用法(业务单例内部):
|
|
23
|
+
|
|
24
|
+
from sycommon.config.config_change_notifier import notifier
|
|
25
|
+
|
|
26
|
+
class RedisService:
|
|
27
|
+
@classmethod
|
|
28
|
+
async def reload(cls):
|
|
29
|
+
...
|
|
30
|
+
|
|
31
|
+
@classmethod
|
|
32
|
+
def init(cls, ...):
|
|
33
|
+
...
|
|
34
|
+
notifier.register("redis", async_cb=cls.reload)
|
|
35
|
+
"""
|
|
36
|
+
import asyncio
|
|
37
|
+
import threading
|
|
38
|
+
from typing import Awaitable, Callable, Dict, Optional, Tuple
|
|
39
|
+
|
|
40
|
+
from sycommon.logging.kafka_log import SYLogger
|
|
41
|
+
|
|
42
|
+
# 默认去抖窗口(秒):Nacos 多个 dataId 连续变更时合并为一次 reload
|
|
43
|
+
_DEFAULT_DEBOUNCE_SECONDS = 0.5
|
|
44
|
+
|
|
45
|
+
# 同步/异步回调签名
|
|
46
|
+
SyncCB = Callable[[], None]
|
|
47
|
+
AsyncCB = Callable[[], Awaitable[None]]
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class ConfigChangeNotifier:
|
|
51
|
+
"""配置变更事件总线(模块级单例 ``notifier``)"""
|
|
52
|
+
|
|
53
|
+
def __init__(self, debounce_seconds: float = _DEFAULT_DEBOUNCE_SECONDS):
|
|
54
|
+
self._debounce_seconds = debounce_seconds
|
|
55
|
+
# name -> (sync_cb, async_cb)
|
|
56
|
+
self._callbacks: Dict[str, Tuple[Optional[SyncCB], Optional[AsyncCB]]] = {}
|
|
57
|
+
self._lock = threading.Lock()
|
|
58
|
+
# 待触发的去抖定时器
|
|
59
|
+
self._timer: Optional[threading.Timer] = None
|
|
60
|
+
# 业务主事件循环(由 Services._init_event_loop 注入),
|
|
61
|
+
# 用于把 async reload 投递回业务线程。
|
|
62
|
+
self._loop: Optional[asyncio.AbstractEventLoop] = None
|
|
63
|
+
|
|
64
|
+
# ------------------------------------------------------------------ 注册
|
|
65
|
+
def register(
|
|
66
|
+
self,
|
|
67
|
+
name: str,
|
|
68
|
+
sync_cb: Optional[SyncCB] = None,
|
|
69
|
+
async_cb: Optional[AsyncCB] = None,
|
|
70
|
+
) -> None:
|
|
71
|
+
"""注册一个 reload 回调(幂等:同名重复注册覆盖上一次)。
|
|
72
|
+
|
|
73
|
+
Args:
|
|
74
|
+
name: 订阅者唯一标识,建议用单例类名/服务名。
|
|
75
|
+
sync_cb: 同步 reload 函数,在 fan-out 时 inline 执行。
|
|
76
|
+
async_cb: 异步 reload 函数,通过 run_coroutine_threadsafe 投递。
|
|
77
|
+
两者至少传一个。
|
|
78
|
+
"""
|
|
79
|
+
if sync_cb is None and async_cb is None:
|
|
80
|
+
return
|
|
81
|
+
with self._lock:
|
|
82
|
+
self._callbacks[name] = (sync_cb, async_cb)
|
|
83
|
+
|
|
84
|
+
def unregister(self, name: str) -> None:
|
|
85
|
+
"""取消订阅。"""
|
|
86
|
+
with self._lock:
|
|
87
|
+
self._callbacks.pop(name, None)
|
|
88
|
+
|
|
89
|
+
def set_loop(self, loop: Optional[asyncio.AbstractEventLoop]) -> None:
|
|
90
|
+
"""注入业务主事件循环,供 async 回调投递。"""
|
|
91
|
+
self._loop = loop
|
|
92
|
+
|
|
93
|
+
# ------------------------------------------------------------------ 触发
|
|
94
|
+
def fire(self) -> None:
|
|
95
|
+
"""通知一次配置变更(去抖:窗口内多次调用合并为一次 fan-out)。"""
|
|
96
|
+
with self._lock:
|
|
97
|
+
if self._timer is not None:
|
|
98
|
+
# 已有待触发的定时器:取消并重置,相当于「滑动窗口续期」
|
|
99
|
+
self._timer.cancel()
|
|
100
|
+
self._timer = None
|
|
101
|
+
timer = threading.Timer(self._debounce_seconds, self._fan_out)
|
|
102
|
+
timer.daemon = True
|
|
103
|
+
timer.start()
|
|
104
|
+
self._timer = timer
|
|
105
|
+
|
|
106
|
+
def reload_now(self) -> None:
|
|
107
|
+
"""立即触发一次 fan-out(取消挂起的去抖定时器)。供测试/手动触发。"""
|
|
108
|
+
with self._lock:
|
|
109
|
+
if self._timer is not None:
|
|
110
|
+
self._timer.cancel()
|
|
111
|
+
self._timer = None
|
|
112
|
+
self._fan_out()
|
|
113
|
+
|
|
114
|
+
def _fan_out(self) -> None:
|
|
115
|
+
"""执行所有已注册回调。每个回调独立 try/except,互不影响。"""
|
|
116
|
+
# 快照一份,执行期间新的 register 不影响本轮
|
|
117
|
+
items = list(self._callbacks.items())
|
|
118
|
+
loop = self._loop
|
|
119
|
+
|
|
120
|
+
for name, (sync_cb, async_cb) in items:
|
|
121
|
+
if sync_cb is not None:
|
|
122
|
+
try:
|
|
123
|
+
sync_cb()
|
|
124
|
+
except Exception as e: # noqa: BLE001 - 通知器不能让单点故障扩散
|
|
125
|
+
SYLogger.error(
|
|
126
|
+
f"config_change_notifier: 同步 reload 失败 [{name}]: {e}",
|
|
127
|
+
exc_info=True,
|
|
128
|
+
)
|
|
129
|
+
if async_cb is not None:
|
|
130
|
+
self._schedule_async(name, async_cb, loop)
|
|
131
|
+
|
|
132
|
+
def _schedule_async(
|
|
133
|
+
self,
|
|
134
|
+
name: str,
|
|
135
|
+
async_cb: AsyncCB,
|
|
136
|
+
loop: Optional[asyncio.AbstractEventLoop],
|
|
137
|
+
) -> None:
|
|
138
|
+
"""把 async 回调投递到业务事件循环。无 loop 则告警跳过。"""
|
|
139
|
+
if loop is None:
|
|
140
|
+
# 兜底:尝试取当前线程的 loop(极少命中,watcher 在 SDK 线程)
|
|
141
|
+
try:
|
|
142
|
+
loop = asyncio.get_event_loop()
|
|
143
|
+
except RuntimeError:
|
|
144
|
+
loop = None
|
|
145
|
+
if loop is None or loop.is_closed():
|
|
146
|
+
SYLogger.warning(
|
|
147
|
+
f"config_change_notifier: 无可用事件循环,跳过异步 reload [{name}]"
|
|
148
|
+
)
|
|
149
|
+
return
|
|
150
|
+
try:
|
|
151
|
+
future = asyncio.run_coroutine_threadsafe(async_cb(), loop)
|
|
152
|
+
|
|
153
|
+
def _on_done(fut):
|
|
154
|
+
try:
|
|
155
|
+
fut.result()
|
|
156
|
+
except Exception as e: # noqa: BLE001
|
|
157
|
+
SYLogger.error(
|
|
158
|
+
f"config_change_notifier: 异步 reload 失败 [{name}]: {e}",
|
|
159
|
+
exc_info=True,
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
future.add_done_callback(_on_done)
|
|
163
|
+
except Exception as e: # noqa: BLE001
|
|
164
|
+
SYLogger.error(
|
|
165
|
+
f"config_change_notifier: 投递异步 reload 失败 [{name}]: {e}",
|
|
166
|
+
exc_info=True,
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
# 模块级单例
|
|
171
|
+
notifier = ConfigChangeNotifier()
|
|
@@ -10,6 +10,8 @@ from sycommon.synacos.nacos_service import NacosService
|
|
|
10
10
|
|
|
11
11
|
class AsyncDatabaseService(metaclass=SingletonMeta):
|
|
12
12
|
_engine = None
|
|
13
|
+
# setup 时记录入参,供 reload() 重建使用
|
|
14
|
+
_setup_args = None
|
|
13
15
|
|
|
14
16
|
@staticmethod
|
|
15
17
|
async def setup_database(config: dict, shareConfigKey: str):
|
|
@@ -29,10 +31,49 @@ class AsyncDatabaseService(metaclass=SingletonMeta):
|
|
|
29
31
|
if not await connector.test_connection():
|
|
30
32
|
raise Exception("Database connection test failed")
|
|
31
33
|
|
|
34
|
+
# 记录入参,供热更新 reload 使用
|
|
35
|
+
AsyncDatabaseService._setup_args = (config, shareConfigKey)
|
|
36
|
+
# 订阅配置热更新(幂等)
|
|
37
|
+
from sycommon.config.config_change_notifier import notifier
|
|
38
|
+
notifier.register("async_database", async_cb=AsyncDatabaseService.reload)
|
|
39
|
+
|
|
32
40
|
@staticmethod
|
|
33
41
|
def engine():
|
|
34
42
|
return AsyncDatabaseService._engine
|
|
35
43
|
|
|
44
|
+
@staticmethod
|
|
45
|
+
async def dispose() -> None:
|
|
46
|
+
"""释放异步引擎连接池资源"""
|
|
47
|
+
if AsyncDatabaseService._engine is not None:
|
|
48
|
+
try:
|
|
49
|
+
await AsyncDatabaseService._engine.dispose()
|
|
50
|
+
except Exception as e:
|
|
51
|
+
SYLogger.error(f"AsyncDatabase engine dispose error: {e}")
|
|
52
|
+
finally:
|
|
53
|
+
AsyncDatabaseService._engine = None
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
async def reload(cls) -> None:
|
|
57
|
+
"""配置热更新:dispose 旧引擎并按最新配置重建,失败回退。"""
|
|
58
|
+
if not cls._setup_args:
|
|
59
|
+
return
|
|
60
|
+
old_engine = cls._engine
|
|
61
|
+
# 清掉 AsyncDatabaseConnector 单例缓存,使其按新配置重建
|
|
62
|
+
from sycommon.config.Config import SingletonMeta
|
|
63
|
+
SingletonMeta._instances.pop(AsyncDatabaseConnector, None)
|
|
64
|
+
try:
|
|
65
|
+
await cls.setup_database(*cls._setup_args)
|
|
66
|
+
except Exception as e:
|
|
67
|
+
SYLogger.error(f"AsyncDatabaseService reload 重建失败: {e}", exc_info=True)
|
|
68
|
+
cls._engine = old_engine
|
|
69
|
+
return
|
|
70
|
+
# 新 engine 建好,释放旧的
|
|
71
|
+
if old_engine is not None:
|
|
72
|
+
try:
|
|
73
|
+
await old_engine.dispose()
|
|
74
|
+
except Exception as e:
|
|
75
|
+
SYLogger.error(f"AsyncDatabaseService reload 释放旧 engine 失败: {e}")
|
|
76
|
+
|
|
36
77
|
|
|
37
78
|
class AsyncDatabaseConnector(metaclass=SingletonMeta):
|
|
38
79
|
def __init__(self, db_config: DatabaseConfig):
|
|
@@ -9,6 +9,8 @@ from sycommon.synacos.nacos_service import NacosService
|
|
|
9
9
|
|
|
10
10
|
class DatabaseService(metaclass=SingletonMeta):
|
|
11
11
|
_engine = None
|
|
12
|
+
# setup 时记录入参,供 reload() 重建使用(config + shareConfigKey)
|
|
13
|
+
_setup_args = None
|
|
12
14
|
|
|
13
15
|
@staticmethod
|
|
14
16
|
def setup_database(config: dict, shareConfigKey: str):
|
|
@@ -18,6 +20,11 @@ class DatabaseService(metaclass=SingletonMeta):
|
|
|
18
20
|
converted_dict = convert_dict_keys(databaseConfig)
|
|
19
21
|
db_config = DatabaseConfig.model_validate(converted_dict)
|
|
20
22
|
DatabaseService._engine = DatabaseConnector(db_config).engine
|
|
23
|
+
# 记录入参,供热更新 reload 使用
|
|
24
|
+
DatabaseService._setup_args = (config, shareConfigKey)
|
|
25
|
+
# 订阅配置热更新(幂等)
|
|
26
|
+
from sycommon.config.config_change_notifier import notifier
|
|
27
|
+
notifier.register("database", sync_cb=DatabaseService.reload)
|
|
21
28
|
|
|
22
29
|
@staticmethod
|
|
23
30
|
def engine():
|
|
@@ -35,6 +42,35 @@ class DatabaseService(metaclass=SingletonMeta):
|
|
|
35
42
|
finally:
|
|
36
43
|
DatabaseService._engine = None
|
|
37
44
|
|
|
45
|
+
@staticmethod
|
|
46
|
+
def reload() -> None:
|
|
47
|
+
"""配置热更新:用最新 datasource 重建 engine,失败回退旧 engine。
|
|
48
|
+
|
|
49
|
+
注意:已存在的 BaseDBService 子类实例在 __init__ 缓存了旧 engine 的
|
|
50
|
+
sessionmaker,热切换后长期持有的实例需重新构造;通常业务侧每次请求
|
|
51
|
+
new 出来,影响有限。
|
|
52
|
+
"""
|
|
53
|
+
if not DatabaseService._setup_args:
|
|
54
|
+
return
|
|
55
|
+
old_engine = DatabaseService._engine
|
|
56
|
+
DatabaseService._engine = None
|
|
57
|
+
# 清掉 DatabaseConnector 单例缓存,使其按新配置重建
|
|
58
|
+
from sycommon.config.Config import SingletonMeta
|
|
59
|
+
from sycommon.database.database_service import DatabaseConnector
|
|
60
|
+
SingletonMeta._instances.pop(DatabaseConnector, None)
|
|
61
|
+
try:
|
|
62
|
+
DatabaseService.setup_database(*DatabaseService._setup_args)
|
|
63
|
+
except Exception as e:
|
|
64
|
+
SYLogger.error(f"DatabaseService reload 重建失败: {e}", exc_info=True)
|
|
65
|
+
DatabaseService._engine = old_engine
|
|
66
|
+
return
|
|
67
|
+
# 新 engine 建好,释放旧的
|
|
68
|
+
if old_engine is not None:
|
|
69
|
+
try:
|
|
70
|
+
old_engine.dispose()
|
|
71
|
+
except Exception as e:
|
|
72
|
+
SYLogger.error(f"DatabaseService reload 释放旧 engine 失败: {e}")
|
|
73
|
+
|
|
38
74
|
|
|
39
75
|
class DatabaseConnector(metaclass=SingletonMeta):
|
|
40
76
|
def __init__(self, db_config: DatabaseConfig):
|
|
@@ -72,6 +72,10 @@ class ElasticsearchService(metaclass=SingletonMeta):
|
|
|
72
72
|
cls._initialized = True
|
|
73
73
|
logging.info(f"ElasticsearchService 初始化成功,ES 地址: {es_config.uris}")
|
|
74
74
|
|
|
75
|
+
# 订阅配置热更新(幂等)
|
|
76
|
+
from sycommon.config.config_change_notifier import notifier
|
|
77
|
+
notifier.register("elasticsearch", async_cb=cls.reload)
|
|
78
|
+
|
|
75
79
|
except Exception as e:
|
|
76
80
|
logging.error(f"ElasticsearchService 初始化失败: {e}", exc_info=True)
|
|
77
81
|
|
|
@@ -102,3 +106,26 @@ class ElasticsearchService(metaclass=SingletonMeta):
|
|
|
102
106
|
finally:
|
|
103
107
|
cls._client = None
|
|
104
108
|
cls._initialized = False
|
|
109
|
+
|
|
110
|
+
@classmethod
|
|
111
|
+
async def reload(cls) -> None:
|
|
112
|
+
"""配置热更新:用最新 ElasticsearchConfig 重建 client,失败回退旧 client。"""
|
|
113
|
+
old_client = cls._client
|
|
114
|
+
cls._client = None
|
|
115
|
+
cls._initialized = False
|
|
116
|
+
try:
|
|
117
|
+
cls.init()
|
|
118
|
+
except Exception as e:
|
|
119
|
+
logging.error(f"ElasticsearchService reload 重建失败: {e}", exc_info=True)
|
|
120
|
+
if cls._initialized:
|
|
121
|
+
# 新 client 已就绪,关闭旧的
|
|
122
|
+
if old_client is not None:
|
|
123
|
+
try:
|
|
124
|
+
await old_client.close()
|
|
125
|
+
except Exception as e:
|
|
126
|
+
logging.debug(f"reload 关闭旧 ES 连接失败: {e}")
|
|
127
|
+
else:
|
|
128
|
+
# 重建未成功(如配置缺失),回退到旧 client
|
|
129
|
+
logging.warning("ElasticsearchService reload 未成功,保留旧 ES 连接")
|
|
130
|
+
cls._client = old_client
|
|
131
|
+
cls._initialized = old_client is not None
|
|
@@ -103,6 +103,10 @@ class PgCheckpointService(metaclass=SingletonMeta):
|
|
|
103
103
|
f"PgCheckpointService 初始化成功,地址: {cls._config.host}:{cls._config.port}/{cls._config.dbname}"
|
|
104
104
|
)
|
|
105
105
|
|
|
106
|
+
# 订阅配置热更新(幂等)
|
|
107
|
+
from sycommon.config.config_change_notifier import notifier
|
|
108
|
+
notifier.register("pg_checkpoint", async_cb=cls.reload)
|
|
109
|
+
|
|
106
110
|
except Exception as e:
|
|
107
111
|
logging.error(f"PgCheckpointService 初始化失败: {e}", exc_info=True)
|
|
108
112
|
# 清理可能已创建的连接池
|
|
@@ -150,3 +154,24 @@ class PgCheckpointService(metaclass=SingletonMeta):
|
|
|
150
154
|
cls._pool = None
|
|
151
155
|
cls._checkpointer = None
|
|
152
156
|
cls._initialized = False
|
|
157
|
+
|
|
158
|
+
@classmethod
|
|
159
|
+
async def reload(cls) -> None:
|
|
160
|
+
"""配置热更新:关闭旧连接池并按最新 llm.PostgreSQL 重建。
|
|
161
|
+
|
|
162
|
+
关键:close() 不重置 _setup_attempts,而 setup() 在达到 _max_setup_attempts
|
|
163
|
+
时会拒绝重建,所以这里必须手动重置计数器。
|
|
164
|
+
"""
|
|
165
|
+
if not cls._initialized:
|
|
166
|
+
return
|
|
167
|
+
try:
|
|
168
|
+
await cls.close()
|
|
169
|
+
except Exception as e:
|
|
170
|
+
logging.error(f"PgCheckpointService reload close 失败: {e}", exc_info=True)
|
|
171
|
+
# 重置重试计数器,允许重新 setup
|
|
172
|
+
cls._setup_attempts = 0
|
|
173
|
+
cls._initialized = False
|
|
174
|
+
try:
|
|
175
|
+
await cls.setup()
|
|
176
|
+
except Exception as e:
|
|
177
|
+
logging.error(f"PgCheckpointService reload 重建失败: {e}", exc_info=True)
|
{sycommon_python_lib-0.2.6a11 → sycommon_python_lib-0.2.6a13}/src/sycommon/database/redis_service.py
RENAMED
|
@@ -85,6 +85,10 @@ class RedisService(metaclass=SingletonMeta):
|
|
|
85
85
|
|
|
86
86
|
cls._initialized = True
|
|
87
87
|
|
|
88
|
+
# 订阅配置热更新(幂等):redis.yml 变更后重建连接
|
|
89
|
+
from sycommon.config.config_change_notifier import notifier
|
|
90
|
+
notifier.register("redis", async_cb=cls.reload)
|
|
91
|
+
|
|
88
92
|
except Exception as e:
|
|
89
93
|
logging.error(f"RedisService 初始化失败: {e}", exc_info=True)
|
|
90
94
|
|
|
@@ -765,3 +769,20 @@ class RedisService(metaclass=SingletonMeta):
|
|
|
765
769
|
def is_initialized(cls) -> bool:
|
|
766
770
|
"""检查是否已初始化"""
|
|
767
771
|
return cls._initialized
|
|
772
|
+
|
|
773
|
+
@classmethod
|
|
774
|
+
async def reload(cls) -> None:
|
|
775
|
+
"""配置热更新:关闭旧连接并按最新 redis.yml 重建。
|
|
776
|
+
|
|
777
|
+
重建失败(如新配置缺失/错误)时,旧连接已关闭无法回退,
|
|
778
|
+
会落入未初始化状态并记录日志。Redis 配置通常稳定,可接受。
|
|
779
|
+
"""
|
|
780
|
+
if not cls._initialized:
|
|
781
|
+
# 尚未初始化:无需 reload,等首次 init 读最新配置即可
|
|
782
|
+
return
|
|
783
|
+
try:
|
|
784
|
+
await cls.close()
|
|
785
|
+
except Exception as e:
|
|
786
|
+
logging.error(f"RedisService reload 关闭旧连接失败: {e}", exc_info=True)
|
|
787
|
+
# close() 已将 _initialized 置 False;init() 不传 config 会自动读最新 redis.yml
|
|
788
|
+
cls.init()
|