sycommon-python-lib 0.2.10a4__tar.gz → 0.2.10a8__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.10a4 → sycommon_python_lib-0.2.10a8}/PKG-INFO +1 -1
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/pyproject.toml +1 -1
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/agent/deep_agent.py +95 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/agent/middleware/model_request_prep.py +81 -3
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/agent/sandbox/minio_sync.py +59 -28
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/auth/ldap_service.py +110 -65
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/database/async_database_service.py +5 -1
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/database/database_service.py +5 -1
- sycommon_python_lib-0.2.10a8/src/sycommon/logging/bounded_kafka_sink.py +156 -0
- sycommon_python_lib-0.2.10a8/src/sycommon/logging/bounded_stdout_sink.py +126 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/logging/kafka_log.py +75 -8
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/middleware/sandbox.py +78 -6
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/middleware/traceid.py +27 -4
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/rabbitmq/rabbitmq_client.py +69 -28
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/rabbitmq/rabbitmq_pool.py +152 -5
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/rabbitmq/rabbitmq_service_client_manager.py +9 -5
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/services.py +51 -11
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/sse/sse.py +57 -14
- sycommon_python_lib-0.2.10a8/src/sycommon/tests/test_services_plugin_defaults.py +134 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon_python_lib.egg-info/PKG-INFO +1 -1
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon_python_lib.egg-info/SOURCES.txt +4 -0
- sycommon_python_lib-0.2.10a8/tests/test_summary_echo_break_loop.py +198 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/README.md +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/setup.cfg +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/cli.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/core/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/core/console.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/core/models.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/core/project.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/core/utils.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/agent/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/agent/agent/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/agent/agent/main_agent.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/agent/agent/nodes/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/agent/agent/nodes/example_node.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/agent/agent/states/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/agent/agent/states/agent_state.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/agent/api/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/agent/api/query.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/agent/api/sse/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/agent/api/sse/agent.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/agent/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/agent/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/agent/db/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/agent/db/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/agent/db/model/entity.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/agent/db/service.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/agent/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/agent/model/parse.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/agent/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/agent/tools/mq.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/base/.env.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/base/.gitignore.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/base/Dockerfile.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/base/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/base/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/base/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/base/app.yaml.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/base/client/FileServiceClient.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/base/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/base/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/base/model/file_info.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/base/requirements.txt.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/cli/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/cli/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/cli/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/cli/commands/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/cli/commands/hello.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/cli/pyproject.toml.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/cli/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/web/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/web/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/web/api/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/web/api/echo.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/web/api/sse/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/web/api/sse/echo.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/web/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/web/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/web/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/web/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/command/templates/web/tools/mq.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/nexus/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/__main__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/acp/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/acp/config.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/acp/executor.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/acp/registry.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/acp/server.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/agents/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/agents/factory.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/agents/prompts.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/cdp/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/cdp/browser.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/cdp/capabilities/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/cdp/capabilities/console.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/cdp/capabilities/dom.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/cdp/capabilities/network.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/cdp/capabilities/page_errors.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/cdp/capabilities/performance.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/cdp/capabilities/screenshot.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/cdp/client.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/cdp/protocol.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/cdp/repl.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/cli.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/commands/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/commands/acp_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/commands/acp_serve_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/commands/cdp_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/commands/chat_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/commands/create_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/commands/evaluate_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/commands/init_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/commands/memory_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/commands/resume_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/commands/rollback_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/commands/run_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/core/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/core/backend.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/core/config.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/core/display.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/core/git_integration.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/core/llm.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/core/state.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/evaluate/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/evaluate/api_evaluator.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/memory/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/memory/compressor.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/memory/full.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/memory/hot.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/memory/manager.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/memory/warm.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/mode/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/mode/create.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/mode/optimize.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/models/config_models.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/rl/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/rl/baseline_tests.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/rl/checkpoint.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/rl/convergence.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/rl/diagnosis.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/rl/engine.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/rl/environment.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/rl/experience.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/rl/harness_prompts.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/rl/history.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/rl/optimization_logger.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/rl/pre_validation.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/rl/reward.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/rl/strategy_bandit.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/rl/strategy_generator.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/rl/strategy_prompts.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/simple_chat_agent.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycli/skills/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/agent/acp/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/agent/acp/client.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/agent/acp/fetch.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/agent/acp/server_adapter.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/agent/acp/ssh_init.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/agent/acp/tool.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/agent/agent_manager.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/agent/chat_events.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/agent/mcp/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/agent/mcp/models.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/agent/mcp/tool_loader.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/agent/middleware/sandbox_path_guard.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/agent/middleware/sensitive_guard.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/agent/middleware/skill_write_guard.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/agent/multi_agent_team.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/agent/reasoning_content_patch.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/agent/resume_compactor.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/agent/sandbox/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/agent/sandbox/consistent_hash.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/agent/sandbox/file_ops.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/agent/sandbox/http_sandbox_backend.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/agent/sandbox/sandbox_pool.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/agent/sandbox/sandbox_recovery.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/agent/sandbox/session.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/agent/skills_retry_patch.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/agent/summarization_utils.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/auth/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/auth/oa_cache.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/auth/oa_crypto.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/auth/oa_service.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/auth/wecom_ldap_service.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/config/ACPAgentConfig.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/config/Config.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/config/DatabaseConfig.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/config/EgressPolicyConfig.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/config/ElasticsearchConfig.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/config/EmbeddingConfig.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/config/LLMConfig.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/config/LangfuseConfig.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/config/MQConfig.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/config/PgConfig.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/config/RedisConfig.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/config/RerankerConfig.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/config/SentryConfig.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/config/XxlJobConfig.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/config/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/config/config_change_notifier.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/database/async_base_db_service.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/database/base_db_service.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/database/elasticsearch_service.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/database/pg_checkpoint_service.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/database/redis_service.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/database/resilient_pg_saver.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/database/token_usage_db_service.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/health/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/health/health_check.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/health/metrics.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/health/ping.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/heartbeat_process/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/heartbeat_process/heartbeat_config.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/heartbeat_process/heartbeat_process_manager.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/heartbeat_process/heartbeat_process_worker.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/llm/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/llm/embedding.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/llm/get_llm.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/llm/llm_logger.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/llm/llm_tokens.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/llm/llm_with_token_tracking.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/llm/native_with_fallback_runnable.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/llm/output_fixing_runnable.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/llm/struct_token.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/llm/sy_langfuse.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/llm/tiktoken_cache/9b5ad71b2ce5302211f9c61530b329a4922fc6a4 +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/llm/tiktoken_cache/fb374d419588a4632f3f557e76b4b70aebbca790 +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/llm/token_usage_es_service.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/llm/token_usage_mysql_service.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/llm/token_utils.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/llm/usage_token.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/logging/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/logging/async_sql_logger.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/logging/log_masker.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/logging/logger_levels.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/logging/logger_wrapper.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/logging/process_logger.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/logging/sql_logger.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/mcp_server/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/mcp_server/server.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/middleware/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/middleware/context.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/middleware/cors.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/middleware/docs.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/middleware/egress_wall.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/middleware/exception.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/middleware/middleware.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/middleware/monitor_memory.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/middleware/mq.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/middleware/sandbox_gateway.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/middleware/timeout.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/middleware/token_tracking.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/middleware/tool_result_truncation.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/models/base_http.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/models/log.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/models/mcp_server_config.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/models/mqlistener_config.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/models/mqmsg_model.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/models/mqsend_config.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/models/sandbox.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/models/sso_user.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/models/token_usage.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/models/token_usage_mysql.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/models/xxljob_handler_config.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/notice/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/notice/uvicorn_monitor.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/notice/wecom_message.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/rabbitmq/process_pool_consumer.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/rabbitmq/rabbit_management_client.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/rabbitmq/rabbitmq_service.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/rabbitmq/rabbitmq_service_connection_monitor.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/rabbitmq/rabbitmq_service_consumer_manager.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/rabbitmq/rabbitmq_service_core.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/rabbitmq/rabbitmq_service_producer_manager.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/sentry/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/sentry/sy_sentry.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/sse/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/sse/event.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/synacos/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/synacos/example.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/synacos/example2.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/synacos/feign.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/synacos/feign_client.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/synacos/nacos_client_base.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/synacos/nacos_config_manager.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/synacos/nacos_heartbeat_manager.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/synacos/nacos_service.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/synacos/nacos_service_discovery.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/synacos/nacos_service_registration.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/synacos/param.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/deep_agent_server.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_backend_factory_compat.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_consistent_hash.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_consume_dedup.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_consumer_broker_health.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_consumer_loss_rootcause.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_consumer_recovery.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_consumer_recovery_fix.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_consumer_tags_sync.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_db_keepalive.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_deep_agent.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_dynamic_max_tokens.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_email.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_encoding_cache.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_env_tenant_helper.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_exp_concurrent_migrate.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_exp_delete_queue_with_consumers.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_fault_injection_real.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_fix_verification.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_heartbeat_timeout.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_integration_real_broker.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_mcp_server.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_minimax_reasoning.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_mq.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_mq_config_driven.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_nacos_llm_real.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_oa_login.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_queue_priority_fallback.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_queue_priority_upgrade_timing.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_real_summarization.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_reconnect_scenarios.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_sandbox_glob_hardening.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_summarization_config.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_summarization_real.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_summary_leak_e2e.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_upgrade_aio_pika.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_upgrade_langgraph_stream.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tests/test_upgrade_verification.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tools/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tools/async_utils.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tools/docs.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tools/env.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tools/merge_headers.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tools/snowflake.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tools/syemail.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tools/time_utils.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tools/timing.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/tools/user_id.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/xxljob/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/xxljob/xxljob_service.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon_python_lib.egg-info/dependency_links.txt +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon_python_lib.egg-info/entry_points.txt +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon_python_lib.egg-info/requires.txt +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon_python_lib.egg-info/top_level.txt +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/tests/test_acp_tool.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/tests/test_asyncio_logging.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/tests/test_config_change_notifier.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/tests/test_hotreload_snapshot.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/tests/test_llm_apikey_contextvar.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/tests/test_log_masker.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/tests/test_resilient_pg_saver.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/tests/test_sandbox_path_guard.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/tests/test_sensitive_guard.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/tests/test_simple_chat_agent.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/tests/test_skill_regex_upgrade.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/tests/test_skill_write_guard.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/tests/test_streaming_e2e.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/tests/test_sycli.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/tests/test_sylogger_fixes.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/tests/test_sync_skills_to_sandbox.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/tests/test_time_utils.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/tests/test_traceid_omit_base64.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/tests/test_upload_concurrency.py +0 -0
- {sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/tests/test_upload_e2e_http.py +0 -0
{sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/agent/deep_agent.py
RENAMED
|
@@ -133,6 +133,52 @@ def _match_summary_prefix_overlap(text: str, summary: str,
|
|
|
133
133
|
return 0
|
|
134
134
|
|
|
135
135
|
|
|
136
|
+
# 🔑 复读尾部熔断(9/9 田甜事故最后一环):贪心解码锁死后输出退化成
|
|
137
|
+
# 「短单元无脑重复」(实测指令句连抄 1780 次直到 max_tokens)。只查
|
|
138
|
+
# 尾部 —— 重复段在中间而结尾正常是正常文本(引用/排比),交给回显剥离。
|
|
139
|
+
def _detect_repetition_tail(text: str, *, unit_min: int = 6) -> bool:
|
|
140
|
+
"""检测文本尾部是否陷入单元级复读。
|
|
141
|
+
|
|
142
|
+
取尾部 window 字符,对长度 >= unit_min 的所有候选单元,若该单元
|
|
143
|
+
连续重复出现在尾部且重复次数 >= repeat_min 即判定锁死。
|
|
144
|
+
unit_min=6 让 markdown 表格分隔线(|---|)、常见短语相邻复现不误伤;
|
|
145
|
+
超短单元(单字/两字词)复读用更小下限单独判定。
|
|
146
|
+
"""
|
|
147
|
+
if not text or len(text) < 40:
|
|
148
|
+
return False
|
|
149
|
+
window = text[-600:]
|
|
150
|
+
repeat_min = 4
|
|
151
|
+
# 1) 常规单元:长度 unit_min..64,从长到短,命中即报
|
|
152
|
+
for size in range(64, unit_min - 1, -1):
|
|
153
|
+
unit = window[-size:]
|
|
154
|
+
if unit.count("\n") > size // 2:
|
|
155
|
+
continue # 大半是换行的"单元"不可信
|
|
156
|
+
n = 0
|
|
157
|
+
i = len(window)
|
|
158
|
+
while i >= size and window[i - size:i] == unit:
|
|
159
|
+
n += 1
|
|
160
|
+
i -= size
|
|
161
|
+
if n >= repeat_min:
|
|
162
|
+
return True
|
|
163
|
+
# 2) 超短单元(2-5 字符)复读:需要更高重复次数(10+)才报,
|
|
164
|
+
# 避免「的地得」、缩进、表格线等正常高频短串误伤。
|
|
165
|
+
# 下限取 unit_min(调用方传 unit_min=2 即启用 2 字符判定)。
|
|
166
|
+
for size in range(5, unit_min - 1, -1):
|
|
167
|
+
if size < 2:
|
|
168
|
+
break
|
|
169
|
+
unit = window[-size:]
|
|
170
|
+
if unit.strip() == "":
|
|
171
|
+
continue
|
|
172
|
+
n = 0
|
|
173
|
+
i = len(window)
|
|
174
|
+
while i >= size and window[i - size:i] == unit:
|
|
175
|
+
n += 1
|
|
176
|
+
i -= size
|
|
177
|
+
if n >= 10:
|
|
178
|
+
return True
|
|
179
|
+
return False
|
|
180
|
+
|
|
181
|
+
|
|
136
182
|
@tool
|
|
137
183
|
def get_current_date() -> str:
|
|
138
184
|
"""获取当前日期时间(北京时间)"""
|
|
@@ -364,6 +410,9 @@ class DeepAgent:
|
|
|
364
410
|
# 兜底:累积流式 chunk 中的 usage_metadata(middleware 在流式场景可能拿不到)
|
|
365
411
|
total_input_tokens = 0
|
|
366
412
|
total_output_tokens = 0
|
|
413
|
+
# 🔑 复读尾部熔断状态:上次判定时的文本长度(100 字符节流)+ 熔断标记
|
|
414
|
+
_last_repetition_check = 0
|
|
415
|
+
_repetition_detected = False
|
|
367
416
|
|
|
368
417
|
# ── 设置 chat turn 级 trace_id ──
|
|
369
418
|
# 如果上层(HTTP 中间件等)已设置 trace_id 则沿用,否则生成新的。
|
|
@@ -847,6 +896,21 @@ class DeepAgent:
|
|
|
847
896
|
await on_event(event)
|
|
848
897
|
yield event
|
|
849
898
|
|
|
899
|
+
# 🔑 复读尾部熔断:累积文本尾部陷入单元级复读即中断流,
|
|
900
|
+
# 不再继续消费(后面全是复读垃圾,还会烧满 max_tokens)。
|
|
901
|
+
# 判定按 100 字符节流,避免每 token 全量比对。
|
|
902
|
+
if len(ai_text_content) - _last_repetition_check >= 100:
|
|
903
|
+
_last_repetition_check = len(ai_text_content)
|
|
904
|
+
if _detect_repetition_tail(ai_text_content):
|
|
905
|
+
SYLogger.warning(
|
|
906
|
+
f"[DeepAgent] 复读熔断: 检测到尾部单元级复读,中断本轮流 "
|
|
907
|
+
f"(ai_text_len={len(ai_text_content)}, stream_step={stream_step})")
|
|
908
|
+
_repetition_detected = True
|
|
909
|
+
break
|
|
910
|
+
elif _detect_repetition_tail(ai_text_content) and not _repetition_detected:
|
|
911
|
+
# content 为空但此前已判定复读(如续流 chunk),同样熔断
|
|
912
|
+
pass
|
|
913
|
+
|
|
850
914
|
elif msg_type == "ToolMessage":
|
|
851
915
|
if ai_chunk_buffer:
|
|
852
916
|
SYLogger.debug(
|
|
@@ -927,6 +991,37 @@ class DeepAgent:
|
|
|
927
991
|
f"stream_step={stream_step} | ai_text_len={len(ai_text_content)} | "
|
|
928
992
|
f"tool_calls={len(current_tool_calls)}")
|
|
929
993
|
|
|
994
|
+
# 🔑 复读熔断收尾:熔断发生时尾部截掉复读垃圾(保留正常前文),
|
|
995
|
+
# 追加一个 error 事件提示上层(与空响应同通道,可触发上层降级/重试)。
|
|
996
|
+
if _repetition_detected:
|
|
997
|
+
# 熔断发生时尾部截掉复读垃圾:去掉末尾最后一份完整复读单元
|
|
998
|
+
# (从尾部窗口反推最大重复单元),保留正常前文
|
|
999
|
+
cleaned_tail = ai_text_content
|
|
1000
|
+
window = ai_text_content[-600:]
|
|
1001
|
+
for size in range(64, 1, -1):
|
|
1002
|
+
unit = window[-size:]
|
|
1003
|
+
if size >= 6:
|
|
1004
|
+
n, i = 0, len(window)
|
|
1005
|
+
while i >= size and window[i - size:i] == unit:
|
|
1006
|
+
n += 1
|
|
1007
|
+
i -= size
|
|
1008
|
+
if n >= 4:
|
|
1009
|
+
cleaned_tail = ai_text_content[:-len(unit) * 1].rstrip()
|
|
1010
|
+
break
|
|
1011
|
+
elif unit.strip() and window[-(size * 10):] == unit * 10:
|
|
1012
|
+
cleaned_tail = ai_text_content[:-size].rstrip()
|
|
1013
|
+
break
|
|
1014
|
+
ai_text_content = cleaned_tail
|
|
1015
|
+
SYLogger.warning(
|
|
1016
|
+
f"[DeepAgent] 复读熔断生效: 本轮流提前结束,截断前长度 {len(ai_text_content)}")
|
|
1017
|
+
event = ChatEventBuilder.error(
|
|
1018
|
+
"模型输出陷入重复循环,已自动中断(repetition loop detected)",
|
|
1019
|
+
code="repetition_loop",
|
|
1020
|
+
)
|
|
1021
|
+
if on_event:
|
|
1022
|
+
await on_event(event)
|
|
1023
|
+
yield event
|
|
1024
|
+
|
|
930
1025
|
# 空响应检测:模型被调用但没有产出任何文本。
|
|
931
1026
|
# 🔑 治本修复:纯空响应(无文本且无工具调用,常见于用户派生 key 被网关拒、
|
|
932
1027
|
# 网关返回空壳 AIMessage 而非异常)不再静默只打 warning —— 把它翻译成
|
|
@@ -34,10 +34,55 @@ from langchain.agents.middleware.types import (
|
|
|
34
34
|
ModelResponse,
|
|
35
35
|
ResponseT,
|
|
36
36
|
)
|
|
37
|
-
from langchain_core.messages import BaseMessage, HumanMessage
|
|
37
|
+
from langchain_core.messages import AIMessage, BaseMessage, HumanMessage
|
|
38
38
|
|
|
39
39
|
from sycommon.logging.kafka_log import SYLogger
|
|
40
40
|
|
|
41
|
+
# 🔑 回显剥离(9/9 田甜复读事故):模型把注入的备忘块整块回显进输出,回显随
|
|
42
|
+
# ModelResponse 写入 checkpointer → 下轮上下文里旧回显+新注入并存 → 回显越滚
|
|
43
|
+
# 越多 → 贪心解码锁死成句级复读(实测单条 1780 次)。三层标签成对闭合整块删;
|
|
44
|
+
# 未闭合(复读到 max_tokens 等不到闭合)从开标签截断到结尾 —— 复读垃圾只会
|
|
45
|
+
# 出现在开标签之后,前文正常内容保留。
|
|
46
|
+
_ECHO_TAG_PATTERNS = tuple(re.compile(p, re.DOTALL) for p in (
|
|
47
|
+
r'<internal_context_data>.*?</internal_context_data>',
|
|
48
|
+
r'<compressed_history>.*?</compressed_history>',
|
|
49
|
+
r'<system_context>.*?</system_context>',
|
|
50
|
+
r'<internal_context_data>(?!.*</internal_context_data>).*',
|
|
51
|
+
r'<compressed_history>(?!.*</compressed_history>).*',
|
|
52
|
+
r'<system_context>(?!.*</system_context>).*',
|
|
53
|
+
))
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def _strip_echo_text(text: str) -> str:
|
|
57
|
+
"""剥掉一段文本里的备忘回显块,返回清洗后文本。"""
|
|
58
|
+
for pat in _ECHO_TAG_PATTERNS:
|
|
59
|
+
if pat.search(text):
|
|
60
|
+
text = pat.sub('', text)
|
|
61
|
+
return text.strip()
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def dedupe_memo_lines(summary_text: str) -> str:
|
|
65
|
+
"""备忘条目逐行去重(保持首现顺序与空行)。
|
|
66
|
+
|
|
67
|
+
多轮压缩时新备忘把旧备忘 + 历史回显一起总结,重复条目(实测「文件:
|
|
68
|
+
…」相邻出现两次、「事实: 需求大小分布…」逐轮翻倍)被原样折叠进备忘,
|
|
69
|
+
备忘自身开始自我复制——注入前去重断掉这一层。
|
|
70
|
+
"""
|
|
71
|
+
if not summary_text:
|
|
72
|
+
return summary_text
|
|
73
|
+
seen: set[str] = set()
|
|
74
|
+
out: list[str] = []
|
|
75
|
+
for line in summary_text.splitlines():
|
|
76
|
+
key = line.strip()
|
|
77
|
+
if not key:
|
|
78
|
+
out.append(line)
|
|
79
|
+
continue
|
|
80
|
+
if key in seen:
|
|
81
|
+
continue
|
|
82
|
+
seen.add(key)
|
|
83
|
+
out.append(line)
|
|
84
|
+
return "\n".join(out)
|
|
85
|
+
|
|
41
86
|
|
|
42
87
|
class ModelRequestPrepMiddleware(AgentMiddleware):
|
|
43
88
|
"""模型请求预处理:摘要重定位 + 动态压 max_tokens。
|
|
@@ -59,6 +104,30 @@ class ModelRequestPrepMiddleware(AgentMiddleware):
|
|
|
59
104
|
def name(self) -> str:
|
|
60
105
|
return "ModelRequestPrepMiddleware"
|
|
61
106
|
|
|
107
|
+
def _strip_summary_echo(self, response) -> "ModelResponse[Any]":
|
|
108
|
+
"""响应侧剥回显(断环点):ModelResponse.result 里每条 AIMessage 的
|
|
109
|
+
content 先剥回显块再随 checkpoint 持久化 —— 历史里不再躺回显,
|
|
110
|
+
正反馈环在写入侧断掉。无命中返回原对象(零开销);多模态 list
|
|
111
|
+
content 不动(无稳定文本形态,误伤风险大于收益)。
|
|
112
|
+
"""
|
|
113
|
+
result = getattr(response, "result", None)
|
|
114
|
+
if not result:
|
|
115
|
+
return response
|
|
116
|
+
for msg in result:
|
|
117
|
+
content = getattr(msg, "content", None)
|
|
118
|
+
if not isinstance(msg, AIMessage) or not isinstance(content, str):
|
|
119
|
+
continue
|
|
120
|
+
cleaned = _strip_echo_text(content)
|
|
121
|
+
if cleaned != content:
|
|
122
|
+
try:
|
|
123
|
+
msg.content = cleaned
|
|
124
|
+
SYLogger.warning(
|
|
125
|
+
"[ModelRequestPrep] 已剥除模型输出中的备忘回显 "
|
|
126
|
+
f"(len {len(content)} → {len(cleaned)})")
|
|
127
|
+
except Exception:
|
|
128
|
+
pass
|
|
129
|
+
return response
|
|
130
|
+
|
|
62
131
|
def _relocate_summaries(
|
|
63
132
|
self, request: ModelRequest[ContextT]
|
|
64
133
|
) -> ModelRequest[ContextT]:
|
|
@@ -84,6 +153,9 @@ class ModelRequestPrepMiddleware(AgentMiddleware):
|
|
|
84
153
|
if not _summary_text:
|
|
85
154
|
return request
|
|
86
155
|
|
|
156
|
+
# 🔑 注入前去重:多轮压缩的叠加重复条目不进 system(见 dedupe_memo_lines)
|
|
157
|
+
_summary_text = dedupe_memo_lines(_summary_text)
|
|
158
|
+
|
|
87
159
|
from deepagents.middleware._utils import append_to_system_message
|
|
88
160
|
# 🔑 注入形态 = 备忘在前、行为契约在后(recency:靠近对话末端的指令
|
|
89
161
|
# 遵循度最高),且用正向指令替代"不要复述"禁令 —— 负向禁令对
|
|
@@ -148,7 +220,13 @@ class ModelRequestPrepMiddleware(AgentMiddleware):
|
|
|
148
220
|
request: ModelRequest[ContextT],
|
|
149
221
|
handler: Callable[[ModelRequest[ContextT]], Awaitable[ModelResponse[ResponseT]]],
|
|
150
222
|
) -> ModelResponse[ResponseT]:
|
|
151
|
-
"""
|
|
223
|
+
"""拦截模型调用:摘要重定位(注入前去重)→ max_tokens 动态压 →
|
|
224
|
+
响应剥回显(断环),再返回 handler 结果。"""
|
|
152
225
|
request = self._relocate_summaries(request)
|
|
153
226
|
self._clamp_max_tokens(request)
|
|
154
|
-
|
|
227
|
+
response = await handler(request)
|
|
228
|
+
try:
|
|
229
|
+
return self._strip_summary_echo(response)
|
|
230
|
+
except Exception as e:
|
|
231
|
+
SYLogger.warning(f"[ModelRequestPrep] strip echo failed(放行): {e}")
|
|
232
|
+
return response
|
|
@@ -886,6 +886,26 @@ class MinioSyncService(metaclass=SingletonMeta):
|
|
|
886
886
|
|
|
887
887
|
# ============== 反向同步(MinIO → 沙箱) ==============
|
|
888
888
|
|
|
889
|
+
def _download_object_to_file(self, key: str, dest: str) -> int:
|
|
890
|
+
"""流式下载 MinIO 对象到本地文件(同步,跑在 to_thread),返回字节数。
|
|
891
|
+
|
|
892
|
+
替代旧 resp.read() 整文件进内存:大附件场景一批 5 路并发 × 全量驻留
|
|
893
|
+
= 数百 MB~GB 级 RSS 峰值(打爆内存的根因)。流式写盘后内存峰值 ≈ 单块,
|
|
894
|
+
与文件大小无关;与 _sync_one 的 adownload_to_file 落盘模式对称。
|
|
895
|
+
块大小 1MB(5 路并发 × 1MB = 常驻 ~5MB 级)。
|
|
896
|
+
"""
|
|
897
|
+
resp = self._client.get_object(self._bucket, key)
|
|
898
|
+
try:
|
|
899
|
+
total = 0
|
|
900
|
+
with open(dest, "wb") as f:
|
|
901
|
+
for chunk in resp.stream(1 * 1024 * 1024):
|
|
902
|
+
f.write(chunk)
|
|
903
|
+
total += len(chunk)
|
|
904
|
+
return total
|
|
905
|
+
finally:
|
|
906
|
+
resp.close()
|
|
907
|
+
resp.release_conn()
|
|
908
|
+
|
|
889
909
|
async def restore_from_minio(self, sandbox_backend, user_id: str) -> int:
|
|
890
910
|
"""将 MinIO 中的文件恢复到沙箱
|
|
891
911
|
|
|
@@ -953,9 +973,14 @@ class MinioSyncService(metaclass=SingletonMeta):
|
|
|
953
973
|
# 打满线程池、挤占主请求路径的沙箱操作。
|
|
954
974
|
# 下载协程先抢本用户 5 槽、再抢全局 100 槽,故实际并发 = min(本用户待下载, 全局剩余)。
|
|
955
975
|
#
|
|
956
|
-
# 🔑 OOM
|
|
957
|
-
#
|
|
958
|
-
#
|
|
976
|
+
# 🔑 OOM 治理(两处放大器都已拔掉):
|
|
977
|
+
# - 上传侧旧实现 gather 所有文件内容进 downloaded 列表后才 base64 整包传沙箱,
|
|
978
|
+
# 用户文件多/大时一次几 GB 进内存 → 改【分批流水线】+ 每批立即上传;
|
|
979
|
+
# - 下载侧旧实现 resp.read() 把整文件读进内存,单个大附件即百 MB 级驻留
|
|
980
|
+
# → 改【流式落盘】:MinIO 5MB 块写临时文件 → aupload_stream_from_disk
|
|
981
|
+
# 逐块读盘推沙箱 → 删临时文件,内存峰值 ≈ 单块,与文件大小无关。
|
|
982
|
+
# 另按 list_objects 的 size 累加 total_bytes_seen,超 _MAX_RESTORE_BYTES 跳过剩余
|
|
983
|
+
# (仅 warning,会话末尾全量扫描兜底)。
|
|
959
984
|
restored = 0
|
|
960
985
|
global_sem = _get_restore_download_sem()
|
|
961
986
|
per_user_sem = asyncio.Semaphore(_RESTORE_PER_USER)
|
|
@@ -964,26 +989,43 @@ class MinioSyncService(metaclass=SingletonMeta):
|
|
|
964
989
|
obj_size_map = {o.object_name[len(prefix):]: (o.size or 0) for o in objects}
|
|
965
990
|
|
|
966
991
|
async def _download_one(rel_path: str):
|
|
967
|
-
"""下载单个 MinIO
|
|
992
|
+
"""下载单个 MinIO 对象【流式落盘】再流式上传沙箱,成功 True 失败 None。
|
|
993
|
+
|
|
994
|
+
全程不把整文件 bytes 攒进内存:MinIO 5MB 块写临时文件 →
|
|
995
|
+
aupload_stream_from_disk 逐块读盘推沙箱 → 删临时文件。
|
|
996
|
+
"""
|
|
997
|
+
tmp_path = None
|
|
968
998
|
async with per_user_sem, global_sem:
|
|
969
999
|
try:
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
1000
|
+
import tempfile as _tf
|
|
1001
|
+
with _tf.NamedTemporaryFile(delete=False) as tmp:
|
|
1002
|
+
tmp_path = tmp.name
|
|
1003
|
+
fsize = await asyncio.to_thread(
|
|
1004
|
+
self._download_object_to_file,
|
|
1005
|
+
f"{prefix}{rel_path}", tmp_path
|
|
1006
|
+
)
|
|
1007
|
+
if fsize == 0:
|
|
1008
|
+
SYLogger.warning(f"[MinIO] 下载文件为空/失败: {rel_path}")
|
|
1009
|
+
return None
|
|
1010
|
+
r = await sandbox_backend.aupload_stream_from_disk(
|
|
1011
|
+
f"/{rel_path}", tmp_path
|
|
980
1012
|
)
|
|
981
|
-
|
|
1013
|
+
if getattr(r, "error", None):
|
|
1014
|
+
SYLogger.warning(
|
|
1015
|
+
f"[MinIO] 上传到沙箱失败: {rel_path}, error={r.error}")
|
|
1016
|
+
return None
|
|
1017
|
+
return rel_path
|
|
982
1018
|
except Exception as e:
|
|
983
1019
|
SYLogger.warning(f"[MinIO] 下载文件失败: {rel_path}, error: {e}")
|
|
984
1020
|
return None
|
|
1021
|
+
finally:
|
|
1022
|
+
if tmp_path:
|
|
1023
|
+
try:
|
|
1024
|
+
os.unlink(tmp_path)
|
|
1025
|
+
except OSError:
|
|
1026
|
+
pass
|
|
985
1027
|
|
|
986
|
-
# 分批流水线:下 N 个 → 传 N 个 →
|
|
1028
|
+
# 分批流水线:下 N 个 → 传 N 个 → 临时文件随 _download_one finally 删除
|
|
987
1029
|
total_bytes_seen = 0
|
|
988
1030
|
capped = False
|
|
989
1031
|
batch_size = _RESTORE_PER_USER
|
|
@@ -1010,18 +1052,7 @@ class MinioSyncService(metaclass=SingletonMeta):
|
|
|
1010
1052
|
*[_download_one(rp) for rp in batch_paths]
|
|
1011
1053
|
)
|
|
1012
1054
|
downloaded = [r for r in download_results if r is not None]
|
|
1013
|
-
|
|
1014
|
-
continue
|
|
1015
|
-
try:
|
|
1016
|
-
results = await sandbox_backend.aupload_files(downloaded)
|
|
1017
|
-
for r in results:
|
|
1018
|
-
if not r.error:
|
|
1019
|
-
restored += 1
|
|
1020
|
-
else:
|
|
1021
|
-
SYLogger.warning(
|
|
1022
|
-
f"[MinIO] 上传到沙箱失败: {r.path}, error={r.error}")
|
|
1023
|
-
except Exception as e:
|
|
1024
|
-
SYLogger.warning(f"[MinIO] 批量上传到沙箱失败: {e}")
|
|
1055
|
+
restored += len(downloaded)
|
|
1025
1056
|
# downloaded / download_results 到此出作用域,下一批前可被 GC
|
|
1026
1057
|
|
|
1027
1058
|
if capped:
|
{sycommon_python_lib-0.2.10a4 → sycommon_python_lib-0.2.10a8}/src/sycommon/auth/ldap_service.py
RENAMED
|
@@ -70,6 +70,10 @@ class LDAPAuthResult(BaseModel):
|
|
|
70
70
|
error: Optional[str] = None
|
|
71
71
|
|
|
72
72
|
|
|
73
|
+
class LDAPAuthError(Exception):
|
|
74
|
+
"""单台 LDAP 服务器认证失败(连接或绑定),消息交由上层分类。"""
|
|
75
|
+
|
|
76
|
+
|
|
73
77
|
class LDAPAuthService:
|
|
74
78
|
"""LDAP 认证服务
|
|
75
79
|
|
|
@@ -89,6 +93,9 @@ class LDAPAuthService:
|
|
|
89
93
|
def __init__(self, config: LDAPConfig):
|
|
90
94
|
self.config = config
|
|
91
95
|
self._connection = None
|
|
96
|
+
# 记住最近一次成功过的服务器地址:认证成功/搜索成功后直连它,
|
|
97
|
+
# 失败才重新竞速——避免每一步都为死机器付出 connect 超时的代价。
|
|
98
|
+
self._healthy_url: Optional[str] = None
|
|
92
99
|
|
|
93
100
|
async def authenticate(
|
|
94
101
|
self,
|
|
@@ -97,6 +104,9 @@ class LDAPAuthService:
|
|
|
97
104
|
) -> LDAPAuthResult:
|
|
98
105
|
"""验证用户凭证
|
|
99
106
|
|
|
107
|
+
所有 LDAP 服务器并发 connect+bind,谁先成功立即返回;
|
|
108
|
+
只有在任何一台都不成功时,才等全部结果做错误分类。
|
|
109
|
+
|
|
100
110
|
Args:
|
|
101
111
|
username: 用户名(域账号)
|
|
102
112
|
password: 密码
|
|
@@ -105,85 +115,112 @@ class LDAPAuthService:
|
|
|
105
115
|
LDAPAuthResult: 认证结果
|
|
106
116
|
"""
|
|
107
117
|
try:
|
|
108
|
-
#
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
self._authenticate_sync,
|
|
112
|
-
username,
|
|
113
|
-
password,
|
|
114
|
-
)
|
|
118
|
+
# 在线程池中并发执行各服务器的同步 LDAP 操作
|
|
119
|
+
loop = asyncio.get_event_loop()
|
|
120
|
+
result = await self._authenticate_race(loop, username, password)
|
|
115
121
|
return result
|
|
116
122
|
except Exception as e:
|
|
117
123
|
SYLogger.error(f"[LDAP] 认证异常: {e}")
|
|
118
124
|
return LDAPAuthResult(success=False, error=str(e))
|
|
119
125
|
|
|
120
|
-
def
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
# 构建用户 DN
|
|
126
|
-
user_dn = self._build_user_dn(username)
|
|
126
|
+
async def _authenticate_race(
|
|
127
|
+
self, loop: asyncio.AbstractEventLoop, username: str, password: str
|
|
128
|
+
) -> LDAPAuthResult:
|
|
129
|
+
"""并发对每台服务器执行 connect+bind(+成功后取用户信息)。
|
|
127
130
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
131
|
+
快路径:任一台成功立即返回(LDAPAuthResult.success=True);
|
|
132
|
+
活机器报认证类错误(密码错误)也立即返回——密码在任何一台 DC
|
|
133
|
+
上都错,等其它服务器不会改变结论,不陪死机器耗超时;
|
|
134
|
+
仅全部失败(连接类错误居多)时收齐错误做分类。
|
|
135
|
+
"""
|
|
136
|
+
auth_keywords = [
|
|
137
|
+
"invalidcredentials",
|
|
138
|
+
"invalidattribute",
|
|
139
|
+
"insufficientaccess",
|
|
140
|
+
"密码",
|
|
141
|
+
"credential",
|
|
142
|
+
]
|
|
143
|
+
|
|
144
|
+
def _is_auth_error(msg: str) -> bool:
|
|
145
|
+
lm = msg.lower()
|
|
146
|
+
return any(kw in lm for kw in auth_keywords)
|
|
147
|
+
|
|
148
|
+
def _try_one(url: str):
|
|
149
|
+
"""单台服务器认证;成功返回 (url, result, None),失败返回 (url, None, err)。"""
|
|
133
150
|
try:
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
SYLogger.
|
|
154
|
-
return LDAPAuthResult(
|
|
155
|
-
success=True,
|
|
156
|
-
user=user_info,
|
|
157
|
-
)
|
|
158
|
-
|
|
159
|
-
except LDAPException as e:
|
|
160
|
-
errors.append((url, str(e)))
|
|
161
|
-
SYLogger.warning(f"[LDAP] 连接 {url} 失败: {e}")
|
|
162
|
-
continue
|
|
151
|
+
result = self._authenticate_one(username, password, url)
|
|
152
|
+
return url, result, None
|
|
153
|
+
except LDAPAuthError as e:
|
|
154
|
+
return url, None, str(e)
|
|
155
|
+
|
|
156
|
+
tasks = [
|
|
157
|
+
loop.run_in_executor(None, _try_one, url.rstrip("/"))
|
|
158
|
+
for url in self.config.urls
|
|
159
|
+
]
|
|
160
|
+
|
|
161
|
+
errors: list = []
|
|
162
|
+
for fut in asyncio.as_completed(tasks):
|
|
163
|
+
url, result, err = await fut
|
|
164
|
+
if err is None:
|
|
165
|
+
self._healthy_url = url
|
|
166
|
+
return result
|
|
167
|
+
errors.append((url, err))
|
|
168
|
+
# 认证类错误是终局结论,立即返回,不等仍在 dial 的死机器
|
|
169
|
+
if _is_auth_error(err):
|
|
170
|
+
SYLogger.error(f"[LDAP] 用户 {username} 认证失败: {err}")
|
|
171
|
+
return LDAPAuthResult(success=False, error=f"认证失败: {err}")
|
|
163
172
|
|
|
164
|
-
#
|
|
165
|
-
# 按优先级排序:invalidCredentials / invalidAttribute / insufficientAccess 优先
|
|
166
|
-
auth_keywords = ["invalidcredentials", "invalidattribute", "insufficientaccess", "密码", "credential"]
|
|
173
|
+
# 全部失败:优先返回认证类错误,其次第一台(通常是主服务器)的连接错误
|
|
167
174
|
for url, err in errors:
|
|
168
|
-
if
|
|
175
|
+
if _is_auth_error(err):
|
|
169
176
|
SYLogger.error(f"[LDAP] 用户 {username} 认证失败: {err}")
|
|
170
|
-
return LDAPAuthResult(
|
|
171
|
-
success=False,
|
|
172
|
-
error=f"认证失败: {err}",
|
|
173
|
-
)
|
|
174
|
-
|
|
175
|
-
# 全是连接类错误,返回第一个(通常是主服务器)
|
|
177
|
+
return LDAPAuthResult(success=False, error=f"认证失败: {err}")
|
|
176
178
|
if errors:
|
|
177
179
|
first_err = errors[0][1]
|
|
178
180
|
SYLogger.error(f"[LDAP] 用户 {username} 认证失败: {first_err}")
|
|
179
|
-
return LDAPAuthResult(
|
|
180
|
-
success=False,
|
|
181
|
-
error=f"认证失败: {first_err}",
|
|
182
|
-
)
|
|
181
|
+
return LDAPAuthResult(success=False, error=f"认证失败: {first_err}")
|
|
183
182
|
|
|
184
183
|
SYLogger.error(f"[LDAP] 用户 {username} 认证失败: 未知错误")
|
|
185
184
|
return LDAPAuthResult(success=False, error="认证失败: 未知错误")
|
|
186
185
|
|
|
186
|
+
def _authenticate_one(
|
|
187
|
+
self, username: str, password: str, url: str
|
|
188
|
+
) -> LDAPAuthResult:
|
|
189
|
+
"""对单台 LDAP 服务器执行 connect+bind+取用户信息。
|
|
190
|
+
|
|
191
|
+
Raises:
|
|
192
|
+
LDAPAuthError: 连接或绑定失败(含密码错误),错误消息交由上层分类
|
|
193
|
+
"""
|
|
194
|
+
import ldap3
|
|
195
|
+
from ldap3.core.exceptions import LDAPException
|
|
196
|
+
|
|
197
|
+
user_dn = self._build_user_dn(username)
|
|
198
|
+
|
|
199
|
+
try:
|
|
200
|
+
server = ldap3.Server(
|
|
201
|
+
url,
|
|
202
|
+
get_info=ldap3.ALL,
|
|
203
|
+
connect_timeout=5, # 连接超时 5 秒
|
|
204
|
+
)
|
|
205
|
+
conn = ldap3.Connection(
|
|
206
|
+
server,
|
|
207
|
+
user=user_dn,
|
|
208
|
+
password=password,
|
|
209
|
+
auto_bind=True,
|
|
210
|
+
receive_timeout=10, # 接收超时 10 秒
|
|
211
|
+
)
|
|
212
|
+
|
|
213
|
+
# 认证成功,获取用户信息(同一连接内完成,不再二次拨号)
|
|
214
|
+
user_info = self._get_user_info(conn, username)
|
|
215
|
+
conn.unbind()
|
|
216
|
+
|
|
217
|
+
SYLogger.info(f"[LDAP] 用户 {username} 经 {url} 认证成功")
|
|
218
|
+
return LDAPAuthResult(success=True, user=user_info)
|
|
219
|
+
|
|
220
|
+
except LDAPException as e:
|
|
221
|
+
SYLogger.warning(f"[LDAP] 连接 {url} 失败: {e}")
|
|
222
|
+
raise LDAPAuthError(str(e)) from e
|
|
223
|
+
|
|
187
224
|
def _build_user_dn(self, username: str) -> str:
|
|
188
225
|
"""构建用户 DN
|
|
189
226
|
|
|
@@ -279,16 +316,21 @@ class LDAPAuthService:
|
|
|
279
316
|
return None
|
|
280
317
|
|
|
281
318
|
def _search_user_sync(self, username: str) -> Optional[LDAPUser]:
|
|
282
|
-
"""
|
|
319
|
+
"""同步执行用户搜索;记住的 healthy 服务器优先,失败再逐台回退"""
|
|
283
320
|
import ldap3
|
|
284
321
|
from ldap3.core.exceptions import LDAPException
|
|
285
322
|
|
|
286
323
|
bind_user = self._build_bind_dn(self.config.username)
|
|
287
324
|
|
|
288
|
-
|
|
325
|
+
# healthy 机器优先(它最近验证过可用),其余按配置顺序回退
|
|
326
|
+
urls = [u.rstrip("/") for u in self.config.urls]
|
|
327
|
+
if self._healthy_url and self._healthy_url in urls:
|
|
328
|
+
urls = [self._healthy_url] + [u for u in urls if u != self._healthy_url]
|
|
329
|
+
|
|
330
|
+
for url in urls:
|
|
289
331
|
try:
|
|
290
332
|
server = ldap3.Server(
|
|
291
|
-
url
|
|
333
|
+
url,
|
|
292
334
|
get_info=ldap3.ALL,
|
|
293
335
|
connect_timeout=5,
|
|
294
336
|
)
|
|
@@ -305,10 +347,13 @@ class LDAPAuthService:
|
|
|
305
347
|
conn.unbind()
|
|
306
348
|
|
|
307
349
|
if user_info.dn:
|
|
350
|
+
self._healthy_url = url
|
|
308
351
|
return user_info
|
|
309
352
|
|
|
310
353
|
except LDAPException as e:
|
|
311
354
|
SYLogger.warning(f"[LDAP] 搜索连接 {url} 失败: {e}")
|
|
355
|
+
if url == self._healthy_url:
|
|
356
|
+
self._healthy_url = None
|
|
312
357
|
continue
|
|
313
358
|
|
|
314
359
|
return None
|
|
@@ -28,7 +28,11 @@ class AsyncDatabaseService(metaclass=SingletonMeta):
|
|
|
28
28
|
_setup_args = None
|
|
29
29
|
|
|
30
30
|
@staticmethod
|
|
31
|
-
async def setup_database(config: dict, shareConfigKey: str):
|
|
31
|
+
async def setup_database(config: dict, shareConfigKey: str = None):
|
|
32
|
+
# shareConfigKey 缺省时取 app.yaml 的 Name 服务名
|
|
33
|
+
# (对齐 Services.plugins 的 database_service 默认值)
|
|
34
|
+
if not shareConfigKey:
|
|
35
|
+
shareConfigKey = (config or {}).get('Name', '')
|
|
32
36
|
common = NacosService(config).share_configs.get(shareConfigKey, {})
|
|
33
37
|
if common and common.get('spring', {}).get('datasource', None):
|
|
34
38
|
databaseConfig = common.get('spring', {}).get('datasource', None)
|
|
@@ -15,7 +15,11 @@ class DatabaseService(metaclass=SingletonMeta):
|
|
|
15
15
|
_setup_args = None
|
|
16
16
|
|
|
17
17
|
@staticmethod
|
|
18
|
-
def setup_database(config: dict, shareConfigKey: str):
|
|
18
|
+
def setup_database(config: dict, shareConfigKey: str = None):
|
|
19
|
+
# shareConfigKey 缺省时取 app.yaml 的 Name 服务名
|
|
20
|
+
# (对齐 Services.plugins 的 database_service 默认值)
|
|
21
|
+
if not shareConfigKey:
|
|
22
|
+
shareConfigKey = (config or {}).get('Name', '')
|
|
19
23
|
common = NacosService(config).share_configs.get(shareConfigKey, {})
|
|
20
24
|
if common and common.get('spring', {}).get('datasource', None):
|
|
21
25
|
databaseConfig = common.get('spring', {}).get('datasource', None)
|