sycommon-python-lib 0.2.7a1__tar.gz → 0.2.7a3__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.7a1 → sycommon_python_lib-0.2.7a3}/PKG-INFO +3 -3
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/pyproject.toml +3 -3
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/agent/deep_agent.py +20 -4
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/database/pg_checkpoint_service.py +18 -4
- sycommon_python_lib-0.2.7a3/src/sycommon/database/resilient_pg_saver.py +159 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/heartbeat_process/heartbeat_config.py +12 -3
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/logging/kafka_log.py +123 -35
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/logging/process_logger.py +9 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon_python_lib.egg-info/PKG-INFO +3 -3
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon_python_lib.egg-info/SOURCES.txt +2 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon_python_lib.egg-info/requires.txt +2 -2
- sycommon_python_lib-0.2.7a3/tests/test_resilient_pg_saver.py +259 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/README.md +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/setup.cfg +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/cli.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/core/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/core/console.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/core/models.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/core/project.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/core/utils.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/agent/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/agent/agent/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/agent/agent/main_agent.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/agent/agent/nodes/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/agent/agent/nodes/example_node.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/agent/agent/states/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/agent/agent/states/agent_state.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/agent/api/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/agent/api/query.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/agent/api/sse/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/agent/api/sse/agent.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/agent/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/agent/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/agent/db/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/agent/db/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/agent/db/model/entity.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/agent/db/service.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/agent/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/agent/model/parse.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/agent/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/agent/tools/mq.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/base/.env.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/base/.gitignore.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/base/Dockerfile.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/base/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/base/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/base/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/base/app.yaml.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/base/client/FileServiceClient.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/base/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/base/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/base/model/file_info.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/base/requirements.txt.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/cli/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/cli/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/cli/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/cli/commands/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/cli/commands/hello.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/cli/pyproject.toml.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/cli/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/web/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/web/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/web/api/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/web/api/echo.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/web/api/sse/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/web/api/sse/echo.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/web/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/web/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/web/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/web/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/command/templates/web/tools/mq.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/nexus/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/__main__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/acp/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/acp/config.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/acp/executor.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/acp/registry.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/acp/server.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/agents/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/agents/factory.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/agents/prompts.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/cdp/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/cdp/browser.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/cdp/capabilities/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/cdp/capabilities/console.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/cdp/capabilities/dom.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/cdp/capabilities/network.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/cdp/capabilities/page_errors.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/cdp/capabilities/performance.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/cdp/capabilities/screenshot.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/cdp/client.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/cdp/protocol.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/cdp/repl.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/cli.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/commands/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/commands/acp_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/commands/cdp_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/commands/chat_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/commands/create_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/commands/evaluate_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/commands/init_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/commands/memory_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/commands/resume_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/commands/rollback_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/commands/run_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/core/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/core/backend.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/core/config.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/core/display.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/core/git_integration.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/core/llm.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/core/state.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/evaluate/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/evaluate/api_evaluator.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/memory/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/memory/compressor.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/memory/full.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/memory/hot.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/memory/manager.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/memory/warm.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/mode/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/mode/create.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/mode/optimize.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/models/config_models.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/rl/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/rl/baseline_tests.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/rl/checkpoint.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/rl/convergence.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/rl/diagnosis.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/rl/engine.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/rl/environment.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/rl/experience.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/rl/harness_prompts.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/rl/history.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/rl/optimization_logger.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/rl/pre_validation.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/rl/reward.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/rl/strategy_bandit.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/rl/strategy_generator.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/rl/strategy_prompts.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/simple_chat_agent.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycli/skills/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/agent/acp/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/agent/acp/client.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/agent/acp/fetch.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/agent/acp/ssh_init.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/agent/acp/tool.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/agent/agent_manager.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/agent/chat_events.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/agent/mcp/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/agent/mcp/models.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/agent/mcp/tool_loader.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/agent/multi_agent_team.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/agent/sandbox/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/agent/sandbox/consistent_hash.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/agent/sandbox/file_ops.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/agent/sandbox/http_sandbox_backend.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/agent/sandbox/minio_sync.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/agent/sandbox/sandbox_pool.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/agent/sandbox/sandbox_recovery.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/agent/sandbox/session.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/agent/summarization_utils.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/auth/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/auth/ldap_service.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/auth/oa_cache.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/auth/oa_crypto.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/auth/oa_service.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/auth/wecom_ldap_service.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/config/ACPAgentConfig.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/config/Config.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/config/DatabaseConfig.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/config/ElasticsearchConfig.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/config/EmbeddingConfig.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/config/LLMConfig.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/config/LangfuseConfig.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/config/MQConfig.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/config/PgConfig.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/config/RedisConfig.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/config/RerankerConfig.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/config/SentryConfig.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/config/XxlJobConfig.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/config/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/config/config_change_notifier.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/database/async_base_db_service.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/database/async_database_service.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/database/base_db_service.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/database/database_service.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/database/elasticsearch_service.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/database/redis_service.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/database/token_usage_db_service.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/health/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/health/health_check.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/health/metrics.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/health/ping.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/heartbeat_process/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/heartbeat_process/heartbeat_process_manager.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/heartbeat_process/heartbeat_process_worker.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/llm/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/llm/embedding.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/llm/get_llm.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/llm/llm_logger.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/llm/llm_tokens.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/llm/llm_with_token_tracking.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/llm/native_with_fallback_runnable.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/llm/output_fixing_runnable.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/llm/struct_token.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/llm/sy_langfuse.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/llm/tiktoken_cache/9b5ad71b2ce5302211f9c61530b329a4922fc6a4 +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/llm/tiktoken_cache/fb374d419588a4632f3f557e76b4b70aebbca790 +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/llm/token_usage_es_service.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/llm/token_usage_mysql_service.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/llm/token_utils.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/llm/usage_token.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/logging/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/logging/async_sql_logger.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/logging/log_masker.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/logging/logger_levels.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/logging/logger_wrapper.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/logging/sql_logger.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/mcp_server/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/mcp_server/server.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/middleware/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/middleware/context.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/middleware/cors.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/middleware/docs.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/middleware/exception.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/middleware/middleware.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/middleware/monitor_memory.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/middleware/mq.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/middleware/sandbox.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/middleware/timeout.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/middleware/token_tracking.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/middleware/tool_result_truncation.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/middleware/traceid.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/models/base_http.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/models/log.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/models/mcp_server_config.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/models/mqlistener_config.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/models/mqmsg_model.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/models/mqsend_config.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/models/sandbox.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/models/sso_user.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/models/token_usage.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/models/token_usage_mysql.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/models/xxljob_handler_config.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/notice/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/notice/uvicorn_monitor.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/notice/wecom_message.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/rabbitmq/process_pool_consumer.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/rabbitmq/rabbitmq_client.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/rabbitmq/rabbitmq_pool.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/rabbitmq/rabbitmq_service.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/rabbitmq/rabbitmq_service_client_manager.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/rabbitmq/rabbitmq_service_connection_monitor.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/rabbitmq/rabbitmq_service_consumer_manager.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/rabbitmq/rabbitmq_service_core.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/rabbitmq/rabbitmq_service_producer_manager.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/sentry/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/sentry/sy_sentry.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/services.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/sse/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/sse/event.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/sse/sse.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/synacos/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/synacos/example.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/synacos/example2.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/synacos/feign.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/synacos/feign_client.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/synacos/nacos_client_base.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/synacos/nacos_config_manager.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/synacos/nacos_heartbeat_manager.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/synacos/nacos_service.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/synacos/nacos_service_discovery.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/synacos/nacos_service_registration.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/synacos/param.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/tests/deep_agent_server.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/tests/test_consistent_hash.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/tests/test_consumer_loss_rootcause.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/tests/test_consumer_recovery.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/tests/test_deep_agent.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/tests/test_dynamic_max_tokens.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/tests/test_email.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/tests/test_encoding_cache.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/tests/test_fix_verification.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/tests/test_mcp_server.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/tests/test_minimax_reasoning.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/tests/test_mq.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/tests/test_oa_login.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/tests/test_queue_priority_fallback.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/tests/test_real_summarization.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/tests/test_summarization_config.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/tests/test_summarization_real.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/tests/test_summary_leak_e2e.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/tools/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/tools/async_utils.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/tools/docs.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/tools/env.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/tools/merge_headers.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/tools/snowflake.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/tools/syemail.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/tools/timing.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/xxljob/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/xxljob/xxljob_service.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon_python_lib.egg-info/dependency_links.txt +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon_python_lib.egg-info/entry_points.txt +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon_python_lib.egg-info/top_level.txt +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/tests/test_acp_tool.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/tests/test_asyncio_logging.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/tests/test_config_change_notifier.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/tests/test_hotreload_snapshot.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/tests/test_log_masker.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/tests/test_simple_chat_agent.py +0 -0
- {sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/tests/test_sycli.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sycommon-python-lib
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.7a3
|
|
4
4
|
Summary: Add your description here
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -14,9 +14,9 @@ Requires-Dist: elasticsearch==9.4.1
|
|
|
14
14
|
Requires-Dist: fastapi==0.138.0
|
|
15
15
|
Requires-Dist: jinja2==3.1.6
|
|
16
16
|
Requires-Dist: kafka-python==3.0.2
|
|
17
|
-
Requires-Dist: langchain==1.3.
|
|
17
|
+
Requires-Dist: langchain==1.3.11
|
|
18
18
|
Requires-Dist: langchain-core==1.4.8
|
|
19
|
-
Requires-Dist: langchain-openai==1.3.
|
|
19
|
+
Requires-Dist: langchain-openai==1.3.3
|
|
20
20
|
Requires-Dist: langfuse==4.9.1
|
|
21
21
|
Requires-Dist: langgraph==1.2.6
|
|
22
22
|
Requires-Dist: langgraph-checkpoint-postgres==3.1.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "sycommon-python-lib"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.7a3"
|
|
4
4
|
description = "Add your description here"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
@@ -15,9 +15,9 @@ dependencies = [
|
|
|
15
15
|
"fastapi==0.138.0",
|
|
16
16
|
"jinja2==3.1.6",
|
|
17
17
|
"kafka-python==3.0.2",
|
|
18
|
-
"langchain==1.3.
|
|
18
|
+
"langchain==1.3.11",
|
|
19
19
|
"langchain-core==1.4.8",
|
|
20
|
-
"langchain-openai==1.3.
|
|
20
|
+
"langchain-openai==1.3.3",
|
|
21
21
|
"langfuse==4.9.1",
|
|
22
22
|
"langgraph==1.2.6",
|
|
23
23
|
"langgraph-checkpoint-postgres==3.1.0",
|
{sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/agent/deep_agent.py
RENAMED
|
@@ -88,9 +88,11 @@ def _patch_agent_streaming(agent):
|
|
|
88
88
|
删除此函数及调用即可。
|
|
89
89
|
"""
|
|
90
90
|
# 已验证兼容的版本范围(超出仅警告, 不阻断 —— 闭包强校验是真正的安全网)
|
|
91
|
-
# 1.3.10/1.4.8 经实测确认闭包结构兼容(amodel_node
|
|
92
|
-
# 内层 freevars 含 _get_bound_model/
|
|
93
|
-
|
|
91
|
+
# 1.3.10/1.3.11 + langchain_core 1.4.8 经实测确认闭包结构兼容(amodel_node
|
|
92
|
+
# freevars 含 _execute_model_async, 内层 freevars 含 _get_bound_model/
|
|
93
|
+
# _handle_model_output), patch 正常生效。1.3.11 的 _execute_model_async 仍为
|
|
94
|
+
# ainvoke + 不传 config, 官方未修复, 补丁仍需保留。
|
|
95
|
+
_VERIFIED = {"langchain": "1.3.11", "langchain_core": "1.4.8"}
|
|
94
96
|
try:
|
|
95
97
|
import langchain as _lc
|
|
96
98
|
import langchain_core as _lcc
|
|
@@ -249,11 +251,22 @@ def _patch_agent_streaming(agent):
|
|
|
249
251
|
# 从 ContextVar 读取 LangGraph 注入的 config(含 StreamMessagesHandler)
|
|
250
252
|
config = var_child_runnable_config.get()
|
|
251
253
|
|
|
252
|
-
# 用 astream 替代 ainvoke, 每个 token
|
|
254
|
+
# 用 astream 替代 ainvoke, 每个 token 规发 on_llm_new_token
|
|
253
255
|
# 注意: ChatModel.astream() 产出的是 AIMessageChunk(BaseMessageChunk),
|
|
254
256
|
# 不是 ChatGenerationChunk,因此累加结果直接就是消息本身,没有 .message 属性。
|
|
257
|
+
import time as _t
|
|
258
|
+
_t0 = _t.monotonic()
|
|
259
|
+
_msg_count = len(messages) if hasattr(messages, '__len__') else -1
|
|
260
|
+
SYLogger.info(
|
|
261
|
+
f"[LLM-CALL] astream 开始: model={getattr(model_, 'model', '?')}, "
|
|
262
|
+
f"messages={_msg_count} 条")
|
|
255
263
|
chunks: list = []
|
|
264
|
+
_first_chunk_at = None
|
|
256
265
|
async for chunk in model_.astream(messages, config=config):
|
|
266
|
+
if _first_chunk_at is None:
|
|
267
|
+
_first_chunk_at = _t.monotonic()
|
|
268
|
+
SYLogger.info(
|
|
269
|
+
f"[LLM-CALL] 首个 chunk 到达, 耗时 {_first_chunk_at - _t0:.2f}s")
|
|
257
270
|
chunks.append(chunk)
|
|
258
271
|
|
|
259
272
|
if not chunks:
|
|
@@ -262,6 +275,9 @@ def _patch_agent_streaming(agent):
|
|
|
262
275
|
"[StreamingPatch] astream returned empty, fallback to ainvoke")
|
|
263
276
|
output = await model_.ainvoke(messages, config=config)
|
|
264
277
|
else:
|
|
278
|
+
SYLogger.info(
|
|
279
|
+
f"[LLM-CALL] astream 结束, 共 {len(chunks)} 个 chunk, "
|
|
280
|
+
f"总耗时 {_t.monotonic() - _t0:.2f}s")
|
|
265
281
|
generation = chunks[0]
|
|
266
282
|
for c in chunks[1:]:
|
|
267
283
|
generation += c
|
|
@@ -73,7 +73,6 @@ class PgCheckpointService(metaclass=SingletonMeta):
|
|
|
73
73
|
cls._config = PgConfig.from_dict(config)
|
|
74
74
|
|
|
75
75
|
from psycopg_pool import AsyncConnectionPool
|
|
76
|
-
from langgraph.checkpoint.postgres.aio import AsyncPostgresSaver
|
|
77
76
|
|
|
78
77
|
conn_string = cls._config.dsn
|
|
79
78
|
|
|
@@ -95,7 +94,14 @@ class PgCheckpointService(metaclass=SingletonMeta):
|
|
|
95
94
|
|
|
96
95
|
await cls._pool.open()
|
|
97
96
|
|
|
98
|
-
|
|
97
|
+
# 🔑 使用自愈型 ResilientPostgresSaver 包装类(而非直接 AsyncPostgresSaver)
|
|
98
|
+
# 关键:reload() 会 close 旧池并新建池,但旧 agent 持有的 checkpointer
|
|
99
|
+
# 对象不会自动更换。ResilientPostgresSaver 的 .conn 动态读取 _pool,
|
|
100
|
+
# 池被关闭时自动重建重试,避免 PoolClosed 异常透传到上层。
|
|
101
|
+
# 复用已有包装实例(isinstance 守卫):reload 时只换池,不换 checkpointer 对象。
|
|
102
|
+
from sycommon.database.resilient_pg_saver import ResilientPostgresSaver
|
|
103
|
+
if not isinstance(cls._checkpointer, ResilientPostgresSaver):
|
|
104
|
+
cls._checkpointer = ResilientPostgresSaver()
|
|
99
105
|
await cls._checkpointer.setup()
|
|
100
106
|
|
|
101
107
|
cls._initialized = True
|
|
@@ -151,8 +157,10 @@ class PgCheckpointService(metaclass=SingletonMeta):
|
|
|
151
157
|
except Exception as e:
|
|
152
158
|
logging.error(f"关闭 PgCheckpointService 连接池失败: {e}")
|
|
153
159
|
finally:
|
|
160
|
+
# 🔑 只清 _pool,保留 _checkpointer(ResilientPostgresSaver 包装对象)。
|
|
161
|
+
# reload() 重建后,包装对象的 .conn 动态读取新 _pool;
|
|
162
|
+
# 旧 agent 持有的包装引用无需更换即可继续工作。
|
|
154
163
|
cls._pool = None
|
|
155
|
-
cls._checkpointer = None
|
|
156
164
|
cls._initialized = False
|
|
157
165
|
|
|
158
166
|
@classmethod
|
|
@@ -164,6 +172,8 @@ class PgCheckpointService(metaclass=SingletonMeta):
|
|
|
164
172
|
"""
|
|
165
173
|
if not cls._initialized:
|
|
166
174
|
return
|
|
175
|
+
old_pool = cls._pool
|
|
176
|
+
old_pool_id = id(old_pool)
|
|
167
177
|
try:
|
|
168
178
|
await cls.close()
|
|
169
179
|
except Exception as e:
|
|
@@ -173,5 +183,9 @@ class PgCheckpointService(metaclass=SingletonMeta):
|
|
|
173
183
|
cls._initialized = False
|
|
174
184
|
try:
|
|
175
185
|
await cls.setup()
|
|
186
|
+
new_pool_id = id(cls._pool) if cls._pool else None
|
|
187
|
+
logging.info(
|
|
188
|
+
f"PgCheckpointService reload 完成: old_pool_id={old_pool_id} "
|
|
189
|
+
f"-> new_pool_id={new_pool_id}, initialized={cls._initialized}")
|
|
176
190
|
except Exception as e:
|
|
177
|
-
logging.error(f"PgCheckpointService reload 重建失败: {e}", exc_info=True)
|
|
191
|
+
logging.error(f"PgCheckpointService reload 重建失败: {e}", exc_info=True)
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
"""自愈型 PostgreSQL Checkpoint Saver
|
|
2
|
+
|
|
3
|
+
解决 ``psycopg_pool.PoolClosed: the pool 'pool-1' is already closed`` 问题。
|
|
4
|
+
|
|
5
|
+
根因:``PgCheckpointService.reload()`` 在 Nacos 配置热更新时会
|
|
6
|
+
``close()`` 旧连接池(``_pool=None``)再 ``setup()`` 新建一个全新的
|
|
7
|
+
``AsyncConnectionPool``。但此前创建的 agent(缓存在内存 sessions 中)已经
|
|
8
|
+
捕获了旧的 ``AsyncPostgresSaver`` 对象,其 ``.conn`` 指向已关闭的旧池。
|
|
9
|
+
LangGraph ``Pregel`` 永久持有该 checkpointer 引用,下次 ``aget_tuple`` 即
|
|
10
|
+
抛 ``PoolClosed``。
|
|
11
|
+
|
|
12
|
+
本类把"checkpointer 对象"与"连接池"解耦:对象只有一个(永久存活),
|
|
13
|
+
``.conn`` 每次调用时动态读 ``PgCheckpointService._pool``;reload 只换池、
|
|
14
|
+
不换对象。即便池处于被关闭的瞬态,热路径方法捕获 ``PoolClosed`` 后触发
|
|
15
|
+
``_ensure_pool_alive`` 重建并精确重试一次,对上层透明。
|
|
16
|
+
|
|
17
|
+
已对照 langgraph-checkpoint-postgres 3.1.0 源码验证:
|
|
18
|
+
- ``AsyncPostgresSaver.__init__``(aio.py:57)执行 ``self.conn = conn``,
|
|
19
|
+
用 property + no-op setter 吸收,构造可存活。
|
|
20
|
+
- ``self.conn`` 在 aio.py 中仅 ``_cursor``(aio.py:374)一处方法内读取,
|
|
21
|
+
所有热路径方法都只经由 ``self._cursor()`` 取池,无构造期缓存。
|
|
22
|
+
"""
|
|
23
|
+
import asyncio
|
|
24
|
+
|
|
25
|
+
from psycopg_pool import PoolClosed
|
|
26
|
+
from langgraph.checkpoint.postgres.aio import AsyncPostgresSaver
|
|
27
|
+
|
|
28
|
+
from sycommon.logging.kafka_log import SYLogger
|
|
29
|
+
|
|
30
|
+
# 自愈并发去重锁(模块级单例)。reload 跑在 Services 主 loop 上,多个并发
|
|
31
|
+
# aget_tuple 同时撞上已关闭池时,只允许一个真正执行重建,其余进锁后双重
|
|
32
|
+
# 检查发现池已恢复即直接返回。
|
|
33
|
+
_heal_lock = asyncio.Lock()
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class ResilientPostgresSaver(AsyncPostgresSaver):
|
|
37
|
+
"""跟随 ``PgCheckpointService._pool`` 的自愈型 checkpointer。
|
|
38
|
+
|
|
39
|
+
- 永久存活,跨 reload 不重建(见 ``PgCheckpointService.setup`` 的
|
|
40
|
+
``isinstance`` 守卫)。
|
|
41
|
+
- ``conn`` property 动态返回当前活跃池;池被关闭时热路径方法自动重建。
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
def __init__(self) -> None:
|
|
45
|
+
# 父类 __init__ 会执行 self.conn = conn;property + no-op setter
|
|
46
|
+
# 吸收该赋值。传 conn=None/pipe=None 避开父类 "pool + pipe 不能同时
|
|
47
|
+
# 非空" 的 guard(aio.py:52)。self.lock/self.loop 由父类设置,跨
|
|
48
|
+
# reload 安全(主 loop 不变)。
|
|
49
|
+
super().__init__(conn=None, pipe=None)
|
|
50
|
+
|
|
51
|
+
# ------------------------------------------------------------------ conn
|
|
52
|
+
@property
|
|
53
|
+
def conn(self): # type: ignore[override]
|
|
54
|
+
"""动态返回当前活跃连接池。
|
|
55
|
+
|
|
56
|
+
池不存在或已关闭时 raise ``PoolClosed``,保持与底层一致的失败语义,
|
|
57
|
+
交由热路径方法的 try/except 捕获后自愈。
|
|
58
|
+
"""
|
|
59
|
+
from sycommon.database.pg_checkpoint_service import PgCheckpointService
|
|
60
|
+
pool = PgCheckpointService._pool
|
|
61
|
+
if pool is None or getattr(pool, "closed", True):
|
|
62
|
+
raise PoolClosed(
|
|
63
|
+
f"the pool {getattr(pool, 'name', 'pool-1')!r} is already closed "
|
|
64
|
+
f"(or not initialized)"
|
|
65
|
+
)
|
|
66
|
+
return pool
|
|
67
|
+
|
|
68
|
+
@conn.setter
|
|
69
|
+
def conn(self, value): # noqa: D401
|
|
70
|
+
"""no-op:吸收父类 ``__init__`` 的 ``self.conn = conn`` 赋值。
|
|
71
|
+
|
|
72
|
+
实际连接池永远通过 getter 动态从 ``PgCheckpointService`` 读取,
|
|
73
|
+
不缓存任何传入值。
|
|
74
|
+
"""
|
|
75
|
+
return
|
|
76
|
+
|
|
77
|
+
# ------------------------------------------------------------- 自愈核心
|
|
78
|
+
async def _ensure_pool_alive(self) -> None:
|
|
79
|
+
"""若连接池已关闭/未初始化,触发一次重建(并发去重)。
|
|
80
|
+
|
|
81
|
+
双重检查:进锁后再查一次池状态,避免多个并发调用重复 reload。
|
|
82
|
+
"""
|
|
83
|
+
from sycommon.database.pg_checkpoint_service import PgCheckpointService
|
|
84
|
+
|
|
85
|
+
# 锁外快查:池可用就直接返回,绝大多数请求走这条快路径
|
|
86
|
+
pool = PgCheckpointService._pool
|
|
87
|
+
if pool is not None and not getattr(pool, "closed", True):
|
|
88
|
+
return
|
|
89
|
+
|
|
90
|
+
async with _heal_lock:
|
|
91
|
+
# 锁内再次检查:可能已有并发协程完成了重建
|
|
92
|
+
pool = PgCheckpointService._pool
|
|
93
|
+
if pool is not None and not getattr(pool, "closed", True):
|
|
94
|
+
return
|
|
95
|
+
old_pool_id = id(pool)
|
|
96
|
+
SYLogger.info(
|
|
97
|
+
f"[ResilientPgSaver] pool closed, triggering self-heal "
|
|
98
|
+
f"(old_pool_id={old_pool_id})")
|
|
99
|
+
try:
|
|
100
|
+
await PgCheckpointService.reload()
|
|
101
|
+
except Exception as e:
|
|
102
|
+
SYLogger.error(
|
|
103
|
+
f"[ResilientPgSaver] self-heal reload 失败: {e}",
|
|
104
|
+
exc_info=True)
|
|
105
|
+
raise
|
|
106
|
+
new_pool = PgCheckpointService._pool
|
|
107
|
+
SYLogger.info(
|
|
108
|
+
f"[ResilientPgSaver] self-heal 完成 "
|
|
109
|
+
f"(old_pool_id={old_pool_id} -> new_pool_id={id(new_pool)})")
|
|
110
|
+
|
|
111
|
+
# ----------------------------------------------------- 热路径方法重试
|
|
112
|
+
# 统一模式:捕获 PoolClosed -> 自愈 -> 精确一次重试。
|
|
113
|
+
# PoolClosed 实际只在打开 cursor(首次从池里取连接)时出现,重试是安全的。
|
|
114
|
+
async def aget_tuple(self, config):
|
|
115
|
+
try:
|
|
116
|
+
return await super().aget_tuple(config)
|
|
117
|
+
except PoolClosed:
|
|
118
|
+
await self._ensure_pool_alive()
|
|
119
|
+
return await super().aget_tuple(config)
|
|
120
|
+
|
|
121
|
+
async def aput(self, config, checkpoint, metadata, new_versions):
|
|
122
|
+
try:
|
|
123
|
+
return await super().aput(config, checkpoint, metadata, new_versions)
|
|
124
|
+
except PoolClosed:
|
|
125
|
+
await self._ensure_pool_alive()
|
|
126
|
+
return await super().aput(config, checkpoint, metadata, new_versions)
|
|
127
|
+
|
|
128
|
+
async def aput_writes(self, config, writes, task_id, task_path=""):
|
|
129
|
+
try:
|
|
130
|
+
return await super().aput_writes(config, writes, task_id, task_path)
|
|
131
|
+
except PoolClosed:
|
|
132
|
+
await self._ensure_pool_alive()
|
|
133
|
+
return await super().aput_writes(config, writes, task_id, task_path)
|
|
134
|
+
|
|
135
|
+
async def adelete_thread(self, thread_id):
|
|
136
|
+
try:
|
|
137
|
+
return await super().adelete_thread(thread_id)
|
|
138
|
+
except PoolClosed:
|
|
139
|
+
await self._ensure_pool_alive()
|
|
140
|
+
return await super().adelete_thread(thread_id)
|
|
141
|
+
|
|
142
|
+
async def alist(self, config, *, filter=None, before=None, limit=None):
|
|
143
|
+
"""异步生成器:首条 PoolClosed 自愈后重新遍历整条流。
|
|
144
|
+
|
|
145
|
+
PoolClosed 只在 cursor 打开(首次取连接)时出现,因此重建后重头
|
|
146
|
+
遍历是安全且语义正确的契约(不会漏放或重放 checkpoint tuple)。
|
|
147
|
+
"""
|
|
148
|
+
try:
|
|
149
|
+
async for item in super().alist(
|
|
150
|
+
config, filter=filter, before=before, limit=limit
|
|
151
|
+
):
|
|
152
|
+
yield item
|
|
153
|
+
return
|
|
154
|
+
except PoolClosed:
|
|
155
|
+
await self._ensure_pool_alive()
|
|
156
|
+
async for item in super().alist(
|
|
157
|
+
config, filter=filter, before=before, limit=limit
|
|
158
|
+
):
|
|
159
|
+
yield item
|
|
@@ -109,6 +109,9 @@ class LogConfig:
|
|
|
109
109
|
namespace_id: str # 命名空间 ID(用于 env 字段)
|
|
110
110
|
kafka_servers: Optional[str] = None # Kafka 服务器地址
|
|
111
111
|
kafka_topic: str = "shengye-json-log" # Kafka topic
|
|
112
|
+
# 全局总开关:false 时不发 kafka。默认 True(未配置/老服务零破坏)。
|
|
113
|
+
# 独立进程(心跳/MQ 进程池)跟随全局 log.enabled,不支持单条强制。
|
|
114
|
+
log_enabled: bool = True
|
|
112
115
|
|
|
113
116
|
@classmethod
|
|
114
117
|
def from_nacos_config(cls, nacos_config: dict, service_name: str, shared_configs: dict = None) -> 'LogConfig':
|
|
@@ -123,15 +126,21 @@ class LogConfig:
|
|
|
123
126
|
LogConfig 实例
|
|
124
127
|
"""
|
|
125
128
|
kafka_servers = None
|
|
129
|
+
log_enabled = True
|
|
126
130
|
|
|
127
|
-
# 尝试从 shared_configs 获取 Kafka 配置
|
|
131
|
+
# 尝试从 shared_configs 获取 Kafka 配置 + 总开关
|
|
128
132
|
if shared_configs and isinstance(shared_configs, dict):
|
|
129
133
|
common_config = shared_configs.get("common.yml", {})
|
|
130
134
|
if isinstance(common_config, dict):
|
|
131
|
-
|
|
135
|
+
log_cfg = common_config.get('log', {})
|
|
136
|
+
if isinstance(log_cfg, dict):
|
|
137
|
+
kafka_servers = log_cfg.get('kafka', {}).get('servers')
|
|
138
|
+
if 'enabled' in log_cfg:
|
|
139
|
+
log_enabled = bool(log_cfg['enabled'])
|
|
132
140
|
|
|
133
141
|
return cls(
|
|
134
142
|
service_name=service_name,
|
|
135
143
|
namespace_id=nacos_config.get('namespaceId', ''),
|
|
136
|
-
kafka_servers=kafka_servers
|
|
144
|
+
kafka_servers=kafka_servers,
|
|
145
|
+
log_enabled=log_enabled
|
|
137
146
|
)
|
{sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/logging/kafka_log.py
RENAMED
|
@@ -26,6 +26,34 @@ LOGURU_FORMAT = (
|
|
|
26
26
|
)
|
|
27
27
|
|
|
28
28
|
|
|
29
|
+
def _global_log_enabled() -> bool:
|
|
30
|
+
"""读取 log.enabled 总开关。未配置 -> True(零破坏)。
|
|
31
|
+
|
|
32
|
+
读取顺序同 log_masker:项目自身 yaml 的 log.enabled 覆盖 common.yml 的
|
|
33
|
+
log.enabled;都未写 -> True。Config 未就绪(本地 dev / 启动早期)-> True,
|
|
34
|
+
避免启动阶段日志丢失。
|
|
35
|
+
|
|
36
|
+
false = 关闭所有 kafka 日志 + 本地打印(单条 enabled=True 除外,见 SYLogger)。
|
|
37
|
+
"""
|
|
38
|
+
try:
|
|
39
|
+
cfg_root = Config().config or {}
|
|
40
|
+
except Exception:
|
|
41
|
+
return True
|
|
42
|
+
if not isinstance(cfg_root, dict):
|
|
43
|
+
return True
|
|
44
|
+
common = (cfg_root.get("common.yml") or {}).get("log", {}) \
|
|
45
|
+
if isinstance(cfg_root.get("common.yml"), dict) else {}
|
|
46
|
+
app_name = cfg_root.get("Name", "")
|
|
47
|
+
project = (cfg_root.get(app_name) or {}).get("log", {}) \
|
|
48
|
+
if app_name and isinstance(cfg_root.get(app_name), dict) else {}
|
|
49
|
+
# 项目覆盖 common;都未写 enabled -> True
|
|
50
|
+
if "enabled" in project:
|
|
51
|
+
return bool(project["enabled"])
|
|
52
|
+
if "enabled" in common:
|
|
53
|
+
return bool(common["enabled"])
|
|
54
|
+
return True
|
|
55
|
+
|
|
56
|
+
|
|
29
57
|
class KafkaSink:
|
|
30
58
|
"""
|
|
31
59
|
自定义 Loguru Sink,负责格式化日志并发送到 Kafka
|
|
@@ -33,15 +61,36 @@ class KafkaSink:
|
|
|
33
61
|
|
|
34
62
|
def __init__(self, service_id: str):
|
|
35
63
|
self.service_id = service_id
|
|
36
|
-
#
|
|
64
|
+
# 获取配置(缓存 bootstrap_servers,供全局关闭时强制日志/ERROR 惰性建 producer 复用)
|
|
37
65
|
from sycommon.synacos.nacos_service import NacosService
|
|
38
66
|
common = NacosService(
|
|
39
67
|
Config().config).share_configs.get("common.yml", {})
|
|
40
|
-
|
|
68
|
+
self._bootstrap_servers = common.get("log", {}).get(
|
|
41
69
|
"kafka", {}).get("servers", None)
|
|
42
70
|
|
|
43
|
-
|
|
44
|
-
|
|
71
|
+
# 全局总开关:false 时不建 producer,write() 在收到 ERROR / 强制日志时
|
|
72
|
+
# (单条 enabled=True)才惰性补建,从而彻底静默普通日志。
|
|
73
|
+
self._enabled = _global_log_enabled()
|
|
74
|
+
self._closed = False
|
|
75
|
+
self._producer_obj = self._build_producer() if self._enabled else None
|
|
76
|
+
self._producer = self._producer_obj
|
|
77
|
+
|
|
78
|
+
# 缓存主机信息,避免每次日志写入都做 DNS 解析
|
|
79
|
+
try:
|
|
80
|
+
self._ip = socket.gethostbyname(socket.gethostname())
|
|
81
|
+
except Exception:
|
|
82
|
+
self._ip = '127.0.0.1'
|
|
83
|
+
self._host_name = socket.gethostname()
|
|
84
|
+
|
|
85
|
+
def _build_producer(self):
|
|
86
|
+
"""构建 KafkaProducer,供 __init__ 与全局关闭时的强制日志/ERROR 惰性复用。
|
|
87
|
+
|
|
88
|
+
注意:kafka-python 的 KafkaProducer 在构造时会尝试拉取元数据,
|
|
89
|
+
broker 不可达时可能抛异常——此处不吞异常,由调用方决定
|
|
90
|
+
(__init__ 保持原启动期失败即抛的行为;write() 的惰性路径 try 包裹)。
|
|
91
|
+
"""
|
|
92
|
+
return KafkaProducer(
|
|
93
|
+
bootstrap_servers=self._bootstrap_servers,
|
|
45
94
|
value_serializer=lambda v: json.dumps(
|
|
46
95
|
v, ensure_ascii=False).encode('utf-8'),
|
|
47
96
|
# 保持原有的优化配置
|
|
@@ -52,14 +101,6 @@ class KafkaSink:
|
|
|
52
101
|
batch_size=16384,
|
|
53
102
|
linger_ms=5,
|
|
54
103
|
)
|
|
55
|
-
self._producer = self._producer_obj
|
|
56
|
-
|
|
57
|
-
# 缓存主机信息,避免每次日志写入都做 DNS 解析
|
|
58
|
-
try:
|
|
59
|
-
self._ip = socket.gethostbyname(socket.gethostname())
|
|
60
|
-
except Exception:
|
|
61
|
-
self._ip = '127.0.0.1'
|
|
62
|
-
self._host_name = socket.gethostname()
|
|
63
104
|
|
|
64
105
|
def write(self, message):
|
|
65
106
|
"""
|
|
@@ -67,9 +108,26 @@ class KafkaSink:
|
|
|
67
108
|
message 参数实际上是 loguru.Message 对象,可以通过 message.record 获取所有字段。
|
|
68
109
|
"""
|
|
69
110
|
try:
|
|
111
|
+
# sink 已显式关闭(shutdown/reload 重建):不再发任何日志
|
|
112
|
+
if self._closed:
|
|
113
|
+
return
|
|
114
|
+
|
|
70
115
|
# producer 已关闭则跳过
|
|
71
116
|
if self._producer is None:
|
|
72
|
-
|
|
117
|
+
# 全局关闭(_enabled=False 时未建 producer):仅放行 ERROR 与
|
|
118
|
+
# 单条强制日志(enabled=True),并为它们惰性补建一次 producer。
|
|
119
|
+
record = message.record
|
|
120
|
+
is_error = record["level"].name == "ERROR"
|
|
121
|
+
is_forced = record["extra"].get("_log_forced")
|
|
122
|
+
if not (is_error or is_forced):
|
|
123
|
+
return
|
|
124
|
+
try:
|
|
125
|
+
self._producer_obj = self._build_producer()
|
|
126
|
+
self._producer = self._producer_obj
|
|
127
|
+
except Exception:
|
|
128
|
+
return
|
|
129
|
+
if self._producer is None:
|
|
130
|
+
return
|
|
73
131
|
|
|
74
132
|
# 1. 获取原始日志记录
|
|
75
133
|
record = message.record
|
|
@@ -169,6 +227,8 @@ class KafkaSink:
|
|
|
169
227
|
|
|
170
228
|
def close(self):
|
|
171
229
|
"""关闭 KafkaProducer,释放连接池资源"""
|
|
230
|
+
# 标记已关闭,阻止 write() 继续发送(含惰性补建 producer 的路径)
|
|
231
|
+
self._closed = True
|
|
172
232
|
if self._producer_obj is None:
|
|
173
233
|
return
|
|
174
234
|
# 先移除引用,阻止 write() 继续发送新消息
|
|
@@ -222,14 +282,18 @@ class KafkaLogger(metaclass=SingletonMeta):
|
|
|
222
282
|
diagnose=True
|
|
223
283
|
)
|
|
224
284
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
285
|
+
# ERROR 本地打印:仅全局开关开启时注册。
|
|
286
|
+
# 全局关闭(log.enabled=false)时不本地打印——ERROR 日志仍会进 kafka
|
|
287
|
+
# (KafkaSink.write 对 ERROR 放行并惰性建 producer),但 stdout 静默。
|
|
288
|
+
if KafkaLogger._sink_instance._enabled:
|
|
289
|
+
logger.add(
|
|
290
|
+
sink=sys.stdout,
|
|
291
|
+
level="ERROR",
|
|
292
|
+
format=LOGURU_FORMAT,
|
|
293
|
+
colorize=True,
|
|
294
|
+
backtrace=True,
|
|
295
|
+
diagnose=True
|
|
296
|
+
)
|
|
233
297
|
|
|
234
298
|
# 桥接 stdlib logging → Loguru,捕获 asyncio 等第三方库的日志
|
|
235
299
|
intercept_handler = _InterceptHandler()
|
|
@@ -374,11 +438,28 @@ class SYLogger:
|
|
|
374
438
|
return f"thread:{threading.current_thread().name}"
|
|
375
439
|
|
|
376
440
|
@staticmethod
|
|
377
|
-
def _log(msg: any, level: str = "INFO"):
|
|
441
|
+
def _log(msg: any, level: str = "INFO", enabled: bool = None):
|
|
378
442
|
"""
|
|
379
443
|
统一日志记录入口
|
|
380
444
|
修复:手动提取堆栈信息并写入 message,确保 Kafka 能收到
|
|
445
|
+
|
|
446
|
+
单条开关(enabled):
|
|
447
|
+
- None(默认):跟随全局 log.enabled。全局关 -> 静默(ERROR 除外,ERROR 始终放行)
|
|
448
|
+
- True:强制发出(即便全局 log.enabled=false,这一条也进 kafka)
|
|
449
|
+
- False:强制静默(即便全局开,这一条也丢)
|
|
450
|
+
|
|
451
|
+
注意:ERROR 级别无论全局开关如何都会进 kafka(KafkaSink.write 对 ERROR 放行),
|
|
452
|
+
此处的 enabled=None + 全局关 对 ERROR 不静默——仅在 enabled=False 时才压制。
|
|
381
453
|
"""
|
|
454
|
+
# 单条开关裁决
|
|
455
|
+
if enabled is False:
|
|
456
|
+
return # 强制静默
|
|
457
|
+
|
|
458
|
+
global_on = _global_log_enabled()
|
|
459
|
+
# 跟随全局且全局关:非 ERROR 静默(ERROR 始终放行,交由 KafkaSink 处理)
|
|
460
|
+
if enabled is None and not global_on and level != "ERROR":
|
|
461
|
+
return
|
|
462
|
+
|
|
382
463
|
# 序列化消息:dict/list 先脱敏(按字段名/子串/长度/总量裁剪),再转 JSON
|
|
383
464
|
if isinstance(msg, (dict, list)):
|
|
384
465
|
msg = _log_masker.sanitize(msg)
|
|
@@ -410,35 +491,42 @@ class SYLogger:
|
|
|
410
491
|
# 将字典转为 JSON 字符串传给 Loguru
|
|
411
492
|
log_json = json.dumps(log_dict, ensure_ascii=False)
|
|
412
493
|
|
|
494
|
+
# 全局关时,单条 enabled=True 需打 _log_forced 标记,KafkaSink 据此放行
|
|
495
|
+
# (ERROR 在 KafkaSink 已放行,无需标记;这里只为非 ERROR 的强制日志打标)。
|
|
496
|
+
if enabled is True and not global_on and level != "ERROR":
|
|
497
|
+
lg = logger.bind(_log_forced=True)
|
|
498
|
+
else:
|
|
499
|
+
lg = logger
|
|
500
|
+
|
|
413
501
|
if level == "ERROR":
|
|
414
502
|
# 依然使用 opt(exception=True) 让控制台打印彩色堆栈
|
|
415
503
|
# 注意:Loguru 内部可能会忽略我们已经塞进去的 detail 字符串,
|
|
416
504
|
# 但这没关系,因为 KafkaSink 解析 message 字符串时会重新读取 detail
|
|
417
|
-
|
|
505
|
+
lg.opt(exception=True).error(log_json)
|
|
418
506
|
elif level == "WARNING":
|
|
419
|
-
|
|
507
|
+
lg.warning(log_json)
|
|
420
508
|
else:
|
|
421
|
-
|
|
509
|
+
lg.info(log_json)
|
|
422
510
|
|
|
423
511
|
if check_env_flag(['DEV_LOG']):
|
|
424
512
|
print(log_dict)
|
|
425
513
|
|
|
426
514
|
@staticmethod
|
|
427
|
-
def info(msg: any, *args, **kwargs):
|
|
428
|
-
SYLogger._log(msg, "INFO")
|
|
515
|
+
def info(msg: any, *args, enabled: bool = None, **kwargs):
|
|
516
|
+
SYLogger._log(msg, "INFO", enabled)
|
|
429
517
|
|
|
430
518
|
@staticmethod
|
|
431
|
-
def warning(msg: any, *args, **kwargs):
|
|
432
|
-
SYLogger._log(msg, "WARNING")
|
|
519
|
+
def warning(msg: any, *args, enabled: bool = None, **kwargs):
|
|
520
|
+
SYLogger._log(msg, "WARNING", enabled)
|
|
433
521
|
|
|
434
522
|
@staticmethod
|
|
435
|
-
def debug(msg: any, *args, **kwargs):
|
|
436
|
-
SYLogger._log(msg, "DEBUG")
|
|
523
|
+
def debug(msg: any, *args, enabled: bool = None, **kwargs):
|
|
524
|
+
SYLogger._log(msg, "DEBUG", enabled)
|
|
437
525
|
|
|
438
526
|
@staticmethod
|
|
439
|
-
def error(msg: any, *args, **kwargs):
|
|
440
|
-
SYLogger._log(msg, "ERROR")
|
|
527
|
+
def error(msg: any, *args, enabled: bool = None, **kwargs):
|
|
528
|
+
SYLogger._log(msg, "ERROR", enabled)
|
|
441
529
|
|
|
442
530
|
@staticmethod
|
|
443
|
-
def exception(msg: any, *args, **kwargs):
|
|
444
|
-
SYLogger._log(msg, "ERROR")
|
|
531
|
+
def exception(msg: any, *args, enabled: bool = None, **kwargs):
|
|
532
|
+
SYLogger._log(msg, "ERROR", enabled)
|
{sycommon_python_lib-0.2.7a1 → sycommon_python_lib-0.2.7a3}/src/sycommon/logging/process_logger.py
RENAMED
|
@@ -58,6 +58,11 @@ class ProcessLogger:
|
|
|
58
58
|
if self._initialized:
|
|
59
59
|
return self._producer is not None
|
|
60
60
|
|
|
61
|
+
# 全局总开关关闭:不建 producer(独立进程跟随全局 log.enabled)
|
|
62
|
+
if not getattr(self.log_config, 'log_enabled', True):
|
|
63
|
+
self._initialized = True
|
|
64
|
+
return False
|
|
65
|
+
|
|
61
66
|
try:
|
|
62
67
|
if self.log_config.kafka_servers:
|
|
63
68
|
from kafka import KafkaProducer
|
|
@@ -102,6 +107,10 @@ class ProcessLogger:
|
|
|
102
107
|
msg: 日志消息
|
|
103
108
|
level: 日志级别
|
|
104
109
|
"""
|
|
110
|
+
# 全局总开关:关闭则不发 kafka(独立进程跟随全局,不支持单条强制)
|
|
111
|
+
if not getattr(self.log_config, 'log_enabled', True):
|
|
112
|
+
return
|
|
113
|
+
|
|
105
114
|
# 序列化消息
|
|
106
115
|
if isinstance(msg, dict) or isinstance(msg, list):
|
|
107
116
|
msg_str = json.dumps(msg, ensure_ascii=False)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sycommon-python-lib
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.7a3
|
|
4
4
|
Summary: Add your description here
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -14,9 +14,9 @@ Requires-Dist: elasticsearch==9.4.1
|
|
|
14
14
|
Requires-Dist: fastapi==0.138.0
|
|
15
15
|
Requires-Dist: jinja2==3.1.6
|
|
16
16
|
Requires-Dist: kafka-python==3.0.2
|
|
17
|
-
Requires-Dist: langchain==1.3.
|
|
17
|
+
Requires-Dist: langchain==1.3.11
|
|
18
18
|
Requires-Dist: langchain-core==1.4.8
|
|
19
|
-
Requires-Dist: langchain-openai==1.3.
|
|
19
|
+
Requires-Dist: langchain-openai==1.3.3
|
|
20
20
|
Requires-Dist: langfuse==4.9.1
|
|
21
21
|
Requires-Dist: langgraph==1.2.6
|
|
22
22
|
Requires-Dist: langgraph-checkpoint-postgres==3.1.0
|
|
@@ -185,6 +185,7 @@ src/sycommon/database/database_service.py
|
|
|
185
185
|
src/sycommon/database/elasticsearch_service.py
|
|
186
186
|
src/sycommon/database/pg_checkpoint_service.py
|
|
187
187
|
src/sycommon/database/redis_service.py
|
|
188
|
+
src/sycommon/database/resilient_pg_saver.py
|
|
188
189
|
src/sycommon/database/token_usage_db_service.py
|
|
189
190
|
src/sycommon/health/__init__.py
|
|
190
191
|
src/sycommon/health/health_check.py
|
|
@@ -313,5 +314,6 @@ tests/test_asyncio_logging.py
|
|
|
313
314
|
tests/test_config_change_notifier.py
|
|
314
315
|
tests/test_hotreload_snapshot.py
|
|
315
316
|
tests/test_log_masker.py
|
|
317
|
+
tests/test_resilient_pg_saver.py
|
|
316
318
|
tests/test_simple_chat_agent.py
|
|
317
319
|
tests/test_sycli.py
|
|
@@ -8,9 +8,9 @@ elasticsearch==9.4.1
|
|
|
8
8
|
fastapi==0.138.0
|
|
9
9
|
jinja2==3.1.6
|
|
10
10
|
kafka-python==3.0.2
|
|
11
|
-
langchain==1.3.
|
|
11
|
+
langchain==1.3.11
|
|
12
12
|
langchain-core==1.4.8
|
|
13
|
-
langchain-openai==1.3.
|
|
13
|
+
langchain-openai==1.3.3
|
|
14
14
|
langfuse==4.9.1
|
|
15
15
|
langgraph==1.2.6
|
|
16
16
|
langgraph-checkpoint-postgres==3.1.0
|