sycommon-python-lib 0.2.6a12__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.6a12 → sycommon_python_lib-0.2.6a13}/PKG-INFO +5 -5
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/pyproject.toml +5 -5
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/sandbox/minio_sync.py +13 -0
- {sycommon_python_lib-0.2.6a12 → 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.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/database/async_database_service.py +41 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/database/database_service.py +36 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/database/elasticsearch_service.py +27 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/database/pg_checkpoint_service.py +25 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/database/redis_service.py +21 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/database/token_usage_db_service.py +42 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/embedding.py +15 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/llm_logger.py +8 -3
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/sy_langfuse.py +20 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/logging/async_sql_logger.py +4 -16
- {sycommon_python_lib-0.2.6a12 → 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.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/logging/sql_logger.py +3 -14
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/middleware/traceid.py +4 -1
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/notice/wecom_message.py +10 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/rabbitmq/rabbitmq_service_core.py +40 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/services.py +8 -9
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/synacos/nacos_config_manager.py +7 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/xxljob/xxljob_service.py +20 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon_python_lib.egg-info/PKG-INFO +5 -5
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon_python_lib.egg-info/SOURCES.txt +5 -0
- {sycommon_python_lib-0.2.6a12 → 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.6a12 → sycommon_python_lib-0.2.6a13}/README.md +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/setup.cfg +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/cli.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/core/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/core/console.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/core/models.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/core/project.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/core/utils.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/agent/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/agent/main_agent.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/agent/nodes/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/agent/nodes/example_node.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/agent/states/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/agent/states/agent_state.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/api/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/api/query.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/api/sse/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/api/sse/agent.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/db/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/db/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/db/model/entity.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/db/service.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/model/parse.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/agent/tools/mq.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/base/.env.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/base/.gitignore.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/base/Dockerfile.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/base/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/base/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/base/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/base/app.yaml.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/base/client/FileServiceClient.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/base/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/base/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/base/model/file_info.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/base/requirements.txt.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/cli/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/cli/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/cli/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/cli/commands/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/cli/commands/hello.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/cli/pyproject.toml.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/cli/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/web/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/web/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/web/api/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/web/api/echo.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/web/api/sse/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/web/api/sse/echo.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/web/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/web/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/web/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/web/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/command/templates/web/tools/mq.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/nexus/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/__main__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/acp/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/acp/config.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/acp/executor.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/acp/registry.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/acp/server.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/agents/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/agents/factory.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/agents/prompts.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/cdp/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/cdp/browser.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/cdp/capabilities/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/cdp/capabilities/console.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/cdp/capabilities/dom.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/cdp/capabilities/network.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/cdp/capabilities/page_errors.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/cdp/capabilities/performance.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/cdp/capabilities/screenshot.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/cdp/client.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/cdp/protocol.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/cdp/repl.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/cli.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/commands/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/commands/acp_cmd.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/commands/cdp_cmd.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/commands/chat_cmd.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/commands/create_cmd.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/commands/evaluate_cmd.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/commands/init_cmd.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/commands/memory_cmd.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/commands/resume_cmd.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/commands/rollback_cmd.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/commands/run_cmd.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/core/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/core/backend.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/core/config.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/core/display.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/core/git_integration.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/core/llm.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/core/state.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/evaluate/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/evaluate/api_evaluator.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/memory/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/memory/compressor.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/memory/full.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/memory/hot.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/memory/manager.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/memory/warm.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/mode/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/mode/create.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/mode/optimize.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/models/config_models.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/baseline_tests.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/checkpoint.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/convergence.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/diagnosis.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/engine.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/environment.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/experience.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/harness_prompts.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/history.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/optimization_logger.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/pre_validation.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/reward.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/strategy_bandit.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/strategy_generator.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/rl/strategy_prompts.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycli/skills/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/agent_manager.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/chat_events.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/deep_agent.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/mcp/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/mcp/models.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/mcp/tool_loader.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/multi_agent_team.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/sandbox/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/sandbox/consistent_hash.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/sandbox/file_ops.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/sandbox/http_sandbox_backend.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/sandbox/sandbox_pool.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/sandbox/sandbox_recovery.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/sandbox/session.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/agent/summarization_utils.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/auth/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/auth/ldap_service.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/auth/oa_cache.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/auth/oa_crypto.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/auth/oa_service.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/config/Config.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/config/DatabaseConfig.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/config/ElasticsearchConfig.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/config/EmbeddingConfig.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/config/LLMConfig.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/config/LangfuseConfig.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/config/MQConfig.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/config/PgConfig.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/config/RedisConfig.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/config/RerankerConfig.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/config/SentryConfig.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/config/XxlJobConfig.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/config/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/database/async_base_db_service.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/database/base_db_service.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/health/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/health/health_check.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/health/metrics.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/health/ping.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/heartbeat_process/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/heartbeat_process/heartbeat_config.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/heartbeat_process/heartbeat_process_manager.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/heartbeat_process/heartbeat_process_worker.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/get_llm.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/llm_tokens.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/llm_with_token_tracking.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/native_with_fallback_runnable.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/output_fixing_runnable.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/struct_token.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/tiktoken_cache/9b5ad71b2ce5302211f9c61530b329a4922fc6a4 +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/tiktoken_cache/fb374d419588a4632f3f557e76b4b70aebbca790 +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/token_usage_es_service.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/token_usage_mysql_service.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/token_utils.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/usage_token.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/logging/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/logging/logger_levels.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/logging/logger_wrapper.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/logging/process_logger.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/mcp_server/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/mcp_server/server.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/middleware/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/middleware/context.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/middleware/cors.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/middleware/docs.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/middleware/exception.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/middleware/middleware.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/middleware/monitor_memory.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/middleware/mq.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/middleware/sandbox.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/middleware/timeout.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/middleware/token_tracking.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/middleware/tool_result_truncation.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/models/base_http.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/models/log.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/models/mcp_server_config.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/models/mqlistener_config.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/models/mqmsg_model.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/models/mqsend_config.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/models/sandbox.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/models/sso_user.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/models/token_usage.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/models/token_usage_mysql.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/models/xxljob_handler_config.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/notice/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/notice/uvicorn_monitor.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/rabbitmq/process_pool_consumer.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/rabbitmq/rabbitmq_client.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/rabbitmq/rabbitmq_pool.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/rabbitmq/rabbitmq_service.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/rabbitmq/rabbitmq_service_client_manager.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/rabbitmq/rabbitmq_service_connection_monitor.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/rabbitmq/rabbitmq_service_consumer_manager.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/rabbitmq/rabbitmq_service_producer_manager.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/sentry/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/sentry/sy_sentry.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/sse/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/sse/event.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/sse/sse.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/synacos/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/synacos/example.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/synacos/example2.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/synacos/feign.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/synacos/feign_client.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/synacos/nacos_client_base.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/synacos/nacos_heartbeat_manager.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/synacos/nacos_service.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/synacos/nacos_service_discovery.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/synacos/nacos_service_registration.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/synacos/param.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/deep_agent_server.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_consistent_hash.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_consumer_loss_rootcause.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_consumer_recovery.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_deep_agent.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_dynamic_max_tokens.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_email.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_encoding_cache.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_fix_verification.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_mcp_server.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_minimax_reasoning.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_mq.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_oa_login.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_real_summarization.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_summarization_config.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_summarization_real.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/tests/test_summary_leak_e2e.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/tools/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/tools/async_utils.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/tools/docs.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/tools/env.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/tools/merge_headers.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/tools/snowflake.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/tools/syemail.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/tools/timing.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/xxljob/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon_python_lib.egg-info/dependency_links.txt +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon_python_lib.egg-info/entry_points.txt +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon_python_lib.egg-info/top_level.txt +0 -0
- {sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/tests/test_asyncio_logging.py +0 -0
- {sycommon_python_lib-0.2.6a12 → 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",
|
|
@@ -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.6a12 → 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()
|
|
@@ -76,6 +76,11 @@ class TokenUsageDBService(metaclass=SingletonMeta):
|
|
|
76
76
|
|
|
77
77
|
cls._initialized = True
|
|
78
78
|
logging.info("TokenUsageDBService 初始化成功")
|
|
79
|
+
|
|
80
|
+
# 订阅配置热更新(幂等)
|
|
81
|
+
from sycommon.config.config_change_notifier import notifier
|
|
82
|
+
notifier.register("token_usage_db", async_cb=cls.reload)
|
|
83
|
+
|
|
79
84
|
return True
|
|
80
85
|
|
|
81
86
|
except Exception as e:
|
|
@@ -117,6 +122,43 @@ class TokenUsageDBService(metaclass=SingletonMeta):
|
|
|
117
122
|
"""检查是否已初始化"""
|
|
118
123
|
return cls._initialized
|
|
119
124
|
|
|
125
|
+
@classmethod
|
|
126
|
+
async def dispose(cls) -> None:
|
|
127
|
+
"""释放异步引擎连接池资源"""
|
|
128
|
+
if cls._engine is not None:
|
|
129
|
+
try:
|
|
130
|
+
await cls._engine.dispose()
|
|
131
|
+
except Exception as e:
|
|
132
|
+
logging.error(f"TokenUsageDBService dispose error: {e}")
|
|
133
|
+
finally:
|
|
134
|
+
cls._engine = None
|
|
135
|
+
cls._session_factory = None
|
|
136
|
+
cls._initialized = False
|
|
137
|
+
|
|
138
|
+
@classmethod
|
|
139
|
+
async def reload(cls) -> None:
|
|
140
|
+
"""配置热更新:dispose 旧引擎并按最新 llm.spring.datasource 重建。
|
|
141
|
+
|
|
142
|
+
新配置缺失时落入未初始化状态(Token 记录功能禁用)。
|
|
143
|
+
"""
|
|
144
|
+
old_engine = cls._engine
|
|
145
|
+
try:
|
|
146
|
+
await cls.dispose()
|
|
147
|
+
except Exception as e:
|
|
148
|
+
logging.error(f"TokenUsageDBService reload dispose 失败: {e}", exc_info=True)
|
|
149
|
+
# init() 不传参,自动读最新 Config().config["llm"].spring.datasource
|
|
150
|
+
try:
|
|
151
|
+
ok = cls.init()
|
|
152
|
+
except Exception as e:
|
|
153
|
+
logging.error(f"TokenUsageDBService reload 重建失败: {e}", exc_info=True)
|
|
154
|
+
ok = False
|
|
155
|
+
if not ok:
|
|
156
|
+
if old_engine is not None:
|
|
157
|
+
logging.warning("TokenUsageDBService reload 未成功,保留旧 engine")
|
|
158
|
+
cls._engine = old_engine
|
|
159
|
+
else:
|
|
160
|
+
logging.warning("TokenUsageDBService reload 失败,Token 记录功能将禁用")
|
|
161
|
+
|
|
120
162
|
|
|
121
163
|
class TokenUsageDBConnector(metaclass=SingletonMeta):
|
|
122
164
|
"""Token 使用量数据库连接器"""
|
|
@@ -42,6 +42,21 @@ class Embedding(metaclass=SingletonMeta):
|
|
|
42
42
|
|
|
43
43
|
atexit.register(self._sync_close_session)
|
|
44
44
|
|
|
45
|
+
# 订阅配置热更新(幂等):清空模型 URL 缓存,下次请求重新从最新配置读取。
|
|
46
|
+
# 不动 self.session:aiohttp session 是共享传输层,与配置无关。
|
|
47
|
+
from sycommon.config.config_change_notifier import notifier
|
|
48
|
+
notifier.register("embedding", sync_cb=self.reload)
|
|
49
|
+
|
|
50
|
+
def reload(self) -> None:
|
|
51
|
+
"""配置热更新:清空模型 URL 缓存。
|
|
52
|
+
|
|
53
|
+
仅清缓存,不重建 aiohttp session(session 与配置无关,重建反而有成本)。
|
|
54
|
+
下次请求 _get_embedding_url/_get_reranker_url 会按最新配置重新填充。
|
|
55
|
+
"""
|
|
56
|
+
with self._url_lock:
|
|
57
|
+
self._embedding_url_cache.clear()
|
|
58
|
+
self._reranker_url_cache.clear()
|
|
59
|
+
|
|
45
60
|
def _get_loop_limiter(self):
|
|
46
61
|
"""获取当前 Loop 的原生 Semaphore"""
|
|
47
62
|
loop = asyncio.get_running_loop()
|
{sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/llm_logger.py
RENAMED
|
@@ -4,6 +4,7 @@ from langchain_core.outputs import GenerationChunk, ChatGeneration
|
|
|
4
4
|
from langchain_core.messages import BaseMessage
|
|
5
5
|
|
|
6
6
|
from sycommon.logging.kafka_log import SYLogger
|
|
7
|
+
from sycommon.logging.log_masker import masker as _log_masker
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
class LLMLogger(AsyncCallbackHandler):
|
|
@@ -63,15 +64,19 @@ class LLMLogger(AsyncCallbackHandler):
|
|
|
63
64
|
def _log_prompts(self, prompts: List[str]) -> None:
|
|
64
65
|
"""记录提示词"""
|
|
65
66
|
for i, prompt in enumerate(prompts):
|
|
66
|
-
|
|
67
|
+
# 用 sanitize 而非 mask_string:遵循 maxLength 做单值截断
|
|
68
|
+
# (mask_string 只在整条超 maxSize 时才动,会把 27KB 的 system prompt 原样落盘)
|
|
69
|
+
SYLogger.info(f"提示词 #{i+1}:\n{_log_masker.sanitize(prompt)}")
|
|
67
70
|
|
|
68
71
|
def _log_chat_messages(self, messages: List[List[BaseMessage]]) -> None:
|
|
69
72
|
"""记录聊天模型的消息"""
|
|
70
73
|
for i, message_group in enumerate(messages):
|
|
71
74
|
SYLogger.info(f"消息组 #{i+1}:")
|
|
72
75
|
for msg in message_group:
|
|
73
|
-
|
|
76
|
+
# content 可能是 str,也可能是 LangChain 多模态的 list[dict]
|
|
77
|
+
# sanitize 会按 maxLength 截断内部的大文本值
|
|
78
|
+
SYLogger.info(f" {msg.type}: {_log_masker.sanitize(msg.content)}")
|
|
74
79
|
|
|
75
80
|
def _log_result(self, result: str, index: int) -> None:
|
|
76
81
|
"""记录结果"""
|
|
77
|
-
SYLogger.info(f"结果 #{index}:\n{result}")
|
|
82
|
+
SYLogger.info(f"结果 #{index}:\n{_log_masker.sanitize(result)}")
|
{sycommon_python_lib-0.2.6a12 → sycommon_python_lib-0.2.6a13}/src/sycommon/llm/sy_langfuse.py
RENAMED
|
@@ -34,6 +34,12 @@ class LangfuseInitializer(metaclass=SingletonMeta):
|
|
|
34
34
|
|
|
35
35
|
# 执行初始化
|
|
36
36
|
self._initialize()
|
|
37
|
+
# 订阅配置热更新(幂等)
|
|
38
|
+
self._register_hot_reload()
|
|
39
|
+
|
|
40
|
+
def _register_hot_reload(self):
|
|
41
|
+
from sycommon.config.config_change_notifier import notifier
|
|
42
|
+
notifier.register("langfuse", sync_cb=self.reload)
|
|
37
43
|
|
|
38
44
|
def _initialize(self):
|
|
39
45
|
"""执行实际的配置读取和组件创建"""
|
|
@@ -113,6 +119,20 @@ class LangfuseInitializer(metaclass=SingletonMeta):
|
|
|
113
119
|
"""获取 Langfuse 组件"""
|
|
114
120
|
return list(self._base_callbacks), self._langfuse_client
|
|
115
121
|
|
|
122
|
+
def reload(self) -> None:
|
|
123
|
+
"""配置热更新:重建 Langfuse client 与回调。
|
|
124
|
+
|
|
125
|
+
Langfuse SDK 的 get_client() 返回全局 client,环境变量变更后重建幂等。
|
|
126
|
+
_initialize() 内部已 try/except,失败不会抛出。
|
|
127
|
+
"""
|
|
128
|
+
try:
|
|
129
|
+
self._base_callbacks = []
|
|
130
|
+
self._langfuse_client = None
|
|
131
|
+
self._initialize()
|
|
132
|
+
SYLogger.info("Langfuse 配置热更新完成")
|
|
133
|
+
except Exception as e:
|
|
134
|
+
SYLogger.error(f"Langfuse 配置热更新失败: {str(e)}", exc_info=True)
|
|
135
|
+
|
|
116
136
|
@staticmethod
|
|
117
137
|
def get() -> Tuple[List[Any], Optional[Langfuse]]:
|
|
118
138
|
"""一句话获取组件"""
|