sycommon-python-lib 0.2.7a40__tar.gz → 0.2.7a42__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.7a40 → sycommon_python_lib-0.2.7a42}/PKG-INFO +1 -1
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/pyproject.toml +1 -1
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/agent/deep_agent.py +46 -3
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/agent/middleware/sensitive_guard.py +34 -4
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/agent/multi_agent_team.py +27 -1
- sycommon_python_lib-0.2.7a42/src/sycommon/agent/resume_compactor.py +165 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/agent/sandbox/file_ops.py +28 -2
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/agent/sandbox/http_sandbox_backend.py +48 -20
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/agent/sandbox/minio_sync.py +133 -20
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/agent/summarization_utils.py +6 -6
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/llm/sy_langfuse.py +13 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/middleware/tool_result_truncation.py +5 -4
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon_python_lib.egg-info/PKG-INFO +1 -1
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon_python_lib.egg-info/SOURCES.txt +1 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/README.md +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/setup.cfg +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/cli.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/core/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/core/console.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/core/models.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/core/project.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/core/utils.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/agent/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/agent/agent/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/agent/agent/main_agent.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/agent/agent/nodes/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/agent/agent/nodes/example_node.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/agent/agent/states/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/agent/agent/states/agent_state.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/agent/api/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/agent/api/query.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/agent/api/sse/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/agent/api/sse/agent.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/agent/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/agent/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/agent/db/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/agent/db/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/agent/db/model/entity.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/agent/db/service.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/agent/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/agent/model/parse.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/agent/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/agent/tools/mq.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/base/.env.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/base/.gitignore.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/base/Dockerfile.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/base/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/base/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/base/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/base/app.yaml.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/base/client/FileServiceClient.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/base/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/base/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/base/model/file_info.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/base/requirements.txt.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/cli/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/cli/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/cli/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/cli/commands/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/cli/commands/hello.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/cli/pyproject.toml.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/cli/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/web/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/web/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/web/api/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/web/api/echo.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/web/api/sse/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/web/api/sse/echo.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/web/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/web/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/web/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/web/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/command/templates/web/tools/mq.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/nexus/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/__main__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/acp/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/acp/config.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/acp/executor.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/acp/registry.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/acp/server.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/agents/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/agents/factory.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/agents/prompts.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/cdp/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/cdp/browser.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/cdp/capabilities/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/cdp/capabilities/console.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/cdp/capabilities/dom.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/cdp/capabilities/network.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/cdp/capabilities/page_errors.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/cdp/capabilities/performance.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/cdp/capabilities/screenshot.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/cdp/client.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/cdp/protocol.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/cdp/repl.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/cli.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/commands/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/commands/acp_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/commands/cdp_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/commands/chat_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/commands/create_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/commands/evaluate_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/commands/init_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/commands/memory_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/commands/resume_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/commands/rollback_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/commands/run_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/core/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/core/backend.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/core/config.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/core/display.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/core/git_integration.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/core/llm.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/core/state.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/evaluate/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/evaluate/api_evaluator.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/memory/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/memory/compressor.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/memory/full.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/memory/hot.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/memory/manager.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/memory/warm.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/mode/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/mode/create.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/mode/optimize.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/models/config_models.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/rl/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/rl/baseline_tests.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/rl/checkpoint.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/rl/convergence.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/rl/diagnosis.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/rl/engine.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/rl/environment.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/rl/experience.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/rl/harness_prompts.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/rl/history.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/rl/optimization_logger.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/rl/pre_validation.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/rl/reward.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/rl/strategy_bandit.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/rl/strategy_generator.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/rl/strategy_prompts.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/simple_chat_agent.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycli/skills/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/agent/acp/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/agent/acp/client.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/agent/acp/fetch.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/agent/acp/ssh_init.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/agent/acp/tool.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/agent/agent_manager.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/agent/chat_events.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/agent/mcp/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/agent/mcp/models.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/agent/mcp/tool_loader.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/agent/middleware/sandbox_path_guard.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/agent/middleware/sitecustomize.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/agent/middleware/skill_api_whitelist.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/agent/middleware/skill_wl_check.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/agent/middleware/skill_write_guard.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/agent/sandbox/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/agent/sandbox/consistent_hash.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/agent/sandbox/sandbox_pool.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/agent/sandbox/sandbox_recovery.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/agent/sandbox/session.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/auth/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/auth/ldap_service.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/auth/oa_cache.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/auth/oa_crypto.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/auth/oa_service.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/auth/wecom_ldap_service.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/config/ACPAgentConfig.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/config/Config.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/config/DatabaseConfig.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/config/ElasticsearchConfig.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/config/EmbeddingConfig.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/config/LLMConfig.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/config/LangfuseConfig.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/config/MQConfig.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/config/PgConfig.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/config/RedisConfig.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/config/RerankerConfig.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/config/SentryConfig.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/config/SkillApiWhitelistConfig.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/config/XxlJobConfig.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/config/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/config/config_change_notifier.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/database/async_base_db_service.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/database/async_database_service.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/database/base_db_service.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/database/database_service.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/database/elasticsearch_service.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/database/pg_checkpoint_service.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/database/redis_service.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/database/resilient_pg_saver.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/database/token_usage_db_service.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/health/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/health/health_check.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/health/metrics.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/health/ping.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/heartbeat_process/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/heartbeat_process/heartbeat_config.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/heartbeat_process/heartbeat_process_manager.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/heartbeat_process/heartbeat_process_worker.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/llm/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/llm/embedding.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/llm/get_llm.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/llm/llm_logger.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/llm/llm_tokens.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/llm/llm_with_token_tracking.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/llm/native_with_fallback_runnable.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/llm/output_fixing_runnable.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/llm/struct_token.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/llm/tiktoken_cache/9b5ad71b2ce5302211f9c61530b329a4922fc6a4 +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/llm/tiktoken_cache/fb374d419588a4632f3f557e76b4b70aebbca790 +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/llm/token_usage_es_service.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/llm/token_usage_mysql_service.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/llm/token_utils.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/llm/usage_token.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/logging/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/logging/async_sql_logger.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/logging/kafka_log.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/logging/log_masker.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/logging/logger_levels.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/logging/logger_wrapper.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/logging/process_logger.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/logging/sql_logger.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/mcp_server/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/mcp_server/server.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/middleware/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/middleware/context.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/middleware/cors.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/middleware/docs.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/middleware/exception.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/middleware/middleware.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/middleware/monitor_memory.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/middleware/mq.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/middleware/sandbox.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/middleware/timeout.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/middleware/token_tracking.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/middleware/traceid.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/models/base_http.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/models/log.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/models/mcp_server_config.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/models/mqlistener_config.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/models/mqmsg_model.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/models/mqsend_config.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/models/sandbox.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/models/sso_user.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/models/token_usage.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/models/token_usage_mysql.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/models/xxljob_handler_config.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/notice/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/notice/uvicorn_monitor.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/notice/wecom_message.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/rabbitmq/process_pool_consumer.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/rabbitmq/rabbitmq_client.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/rabbitmq/rabbitmq_pool.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/rabbitmq/rabbitmq_service.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/rabbitmq/rabbitmq_service_client_manager.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/rabbitmq/rabbitmq_service_connection_monitor.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/rabbitmq/rabbitmq_service_consumer_manager.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/rabbitmq/rabbitmq_service_core.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/rabbitmq/rabbitmq_service_producer_manager.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/sentry/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/sentry/sy_sentry.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/services.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/sse/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/sse/event.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/sse/sse.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/synacos/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/synacos/example.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/synacos/example2.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/synacos/feign.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/synacos/feign_client.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/synacos/nacos_client_base.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/synacos/nacos_config_manager.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/synacos/nacos_heartbeat_manager.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/synacos/nacos_service.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/synacos/nacos_service_discovery.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/synacos/nacos_service_registration.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/synacos/param.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/tests/deep_agent_server.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/tests/test_consistent_hash.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/tests/test_consumer_loss_rootcause.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/tests/test_consumer_recovery.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/tests/test_deep_agent.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/tests/test_dynamic_max_tokens.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/tests/test_email.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/tests/test_encoding_cache.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/tests/test_fix_verification.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/tests/test_mcp_server.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/tests/test_minimax_reasoning.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/tests/test_mq.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/tests/test_oa_login.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/tests/test_queue_priority_fallback.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/tests/test_real_summarization.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/tests/test_summarization_config.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/tests/test_summarization_real.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/tests/test_summary_leak_e2e.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/tests/test_upgrade_aio_pika.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/tests/test_upgrade_langgraph_stream.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/tests/test_upgrade_verification.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/tools/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/tools/async_utils.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/tools/docs.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/tools/env.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/tools/merge_headers.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/tools/snowflake.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/tools/syemail.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/tools/timing.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/xxljob/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/xxljob/xxljob_service.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon_python_lib.egg-info/dependency_links.txt +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon_python_lib.egg-info/entry_points.txt +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon_python_lib.egg-info/requires.txt +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon_python_lib.egg-info/top_level.txt +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/tests/test_acp_tool.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/tests/test_asyncio_logging.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/tests/test_config_change_notifier.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/tests/test_hotreload_snapshot.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/tests/test_llm_apikey_contextvar.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/tests/test_log_masker.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/tests/test_resilient_pg_saver.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/tests/test_sandbox_path_guard.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/tests/test_sensitive_guard.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/tests/test_simple_chat_agent.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/tests/test_skill_regex_upgrade.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/tests/test_skill_write_guard.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/tests/test_sycli.py +0 -0
- {sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/tests/test_sync_skills_to_sandbox.py +0 -0
{sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/agent/deep_agent.py
RENAMED
|
@@ -62,12 +62,18 @@ from sycommon.agent.middleware.sandbox_path_guard import SandboxPathGuardMiddlew
|
|
|
62
62
|
from sycommon.agent.middleware.sensitive_guard import SensitiveGuardMiddleware
|
|
63
63
|
from deepagents.middleware.summarization import create_summarization_tool_middleware # noqa: F401 保留 re-export
|
|
64
64
|
from sycommon.agent.summarization_utils import build_summarization_middleware
|
|
65
|
+
from sycommon.agent.resume_compactor import maybe_compact_before_resume
|
|
65
66
|
|
|
66
67
|
# 流式逐 token 诊断日志开关(默认关)。开启后每个 chunk 都打印
|
|
67
68
|
# chunk_type/content 等(仅供排障)。LLM 最终结果已由 LLMLogger.on_llm_end
|
|
68
69
|
# 统一记录,正常无需打开此开关,避免流式日志刷屏。
|
|
69
70
|
_STREAM_DEBUG = check_env_flag(['DEEP_AGENT_STREAM_DEBUG'], default='false')
|
|
70
71
|
|
|
72
|
+
# 流式 tool_call args buffer 上限(OOM 兜底,env 可调)。
|
|
73
|
+
# 模型生成的超大单 tool_call args(如 base64 大文件内容)会逐段累积到 _args_buffer,
|
|
74
|
+
# 无上限可涨到几十 MB。超限停止追加(只影响前端 tool_call 进度展示,工具实际执行不受影响)。
|
|
75
|
+
MAX_ARGS_BUFFER_BYTES = int(os.environ.get("DEEP_AGENT_MAX_ARGS_BUFFER", 1024 * 1024))
|
|
76
|
+
|
|
71
77
|
if TYPE_CHECKING:
|
|
72
78
|
from deepagents.graph import CompiledStateGraph
|
|
73
79
|
from langchain.agents.middleware.types import AgentState, ContextT, ModelRequest, ModelResponse, ResponseT
|
|
@@ -460,6 +466,7 @@ class DeepAgent:
|
|
|
460
466
|
recovery_manager: Optional[SandboxRecoveryManager] = None,
|
|
461
467
|
rubric_eval_collector: Optional[_RubricEvalCollector] = None,
|
|
462
468
|
sensitive_guard: Optional[SensitiveGuardMiddleware] = None,
|
|
469
|
+
raw_model: Any = None,
|
|
463
470
|
):
|
|
464
471
|
self.user_id = user_id
|
|
465
472
|
self.agent = agent
|
|
@@ -468,14 +475,32 @@ class DeepAgent:
|
|
|
468
475
|
self.recovery_manager = recovery_manager
|
|
469
476
|
self.rubric_eval_collector = rubric_eval_collector
|
|
470
477
|
self.sensitive_guard = sensitive_guard
|
|
478
|
+
# 🔑 存 raw_model 引用,供 cleanup 关 LLM client(root_async_client)。
|
|
479
|
+
# model 被埋进 graph 内部节点闭包,表层拿不到,必须 create 时显式传入。
|
|
480
|
+
self._raw_model = raw_model
|
|
471
481
|
|
|
472
482
|
async def cleanup(self):
|
|
473
|
-
"""
|
|
483
|
+
"""清理资源(沙箱连接 + 敏感检测 client)。
|
|
484
|
+
|
|
485
|
+
🔑 不关 LLM client:root_async_client 底层的 httpx.AsyncClient 是 langchain
|
|
486
|
+
`_cached_async_httpx_client` 的 @lru_cache 共享实例(多个 ChatOpenAI 复用同一个),
|
|
487
|
+
close 它会让所有共享该 client 的后续请求报 "Cannot send a request, as the client
|
|
488
|
+
has been closed"。底层连接池由 langchain lru_cache 管理,进程退出时统一回收。
|
|
489
|
+
"""
|
|
474
490
|
if self.sandbox_backend:
|
|
475
491
|
try:
|
|
476
492
|
await self.sandbox_backend.acleanup()
|
|
477
493
|
except Exception:
|
|
478
494
|
pass
|
|
495
|
+
# 🔑 关敏感检测懒加载的两个独立 ChatOpenAI(detector + internal_raw)。
|
|
496
|
+
# 注意:同样不能 close 底层共享 httpx,aclose 内部已按此处理(只清引用)。
|
|
497
|
+
if self.sensitive_guard is not None:
|
|
498
|
+
try:
|
|
499
|
+
aclose = getattr(self.sensitive_guard, "aclose", None)
|
|
500
|
+
if aclose is not None:
|
|
501
|
+
await aclose()
|
|
502
|
+
except Exception:
|
|
503
|
+
pass
|
|
479
504
|
|
|
480
505
|
async def chat(
|
|
481
506
|
self,
|
|
@@ -512,6 +537,14 @@ class DeepAgent:
|
|
|
512
537
|
_trace_token = SYLogger.set_trace_id(_chat_trace_id)
|
|
513
538
|
|
|
514
539
|
try:
|
|
540
|
+
# 🔑 恢复前主动压缩:若该 thread 的 checkpoint 已超过阈值,先在存储侧压缩历史再恢复,
|
|
541
|
+
# 避免每次会话都把全量 messages 反序列化进内存(单会话恢复峰值 0.5-1GB)。
|
|
542
|
+
# 日常会话(未超阈值)零开销。任何异常仅 warning,绝不阻断 chat。
|
|
543
|
+
try:
|
|
544
|
+
await maybe_compact_before_resume(self)
|
|
545
|
+
except Exception as _e:
|
|
546
|
+
SYLogger.warning(f"[ResumeCompact] 恢复前压缩失败(不阻断 chat): {_e}")
|
|
547
|
+
|
|
515
548
|
input_state = {"messages": [HumanMessage(content=message)]}
|
|
516
549
|
if rubric:
|
|
517
550
|
input_state["rubric"] = rubric
|
|
@@ -805,9 +838,18 @@ class DeepAgent:
|
|
|
805
838
|
existing_tc = None
|
|
806
839
|
|
|
807
840
|
if existing_tc:
|
|
808
|
-
# 追加 args
|
|
841
|
+
# 追加 args 字符串片段(🔑 上限防 OOM:模型生成的超大单 tool_call args
|
|
842
|
+
# 如 base64 大文件内容,无上限会涨到几十 MB。超限停止追加,
|
|
843
|
+
# args 保持 {} —— 只影响前端 tool_call 进度展示,工具实际执行不受影响)。
|
|
809
844
|
if tcc_args_str:
|
|
810
|
-
existing_tc
|
|
845
|
+
buf_len = len(existing_tc.get("_args_buffer", ""))
|
|
846
|
+
if buf_len < MAX_ARGS_BUFFER_BYTES:
|
|
847
|
+
existing_tc["_args_buffer"] += tcc_args_str
|
|
848
|
+
elif not existing_tc.get("_args_truncated"):
|
|
849
|
+
existing_tc["_args_truncated"] = True
|
|
850
|
+
SYLogger.warning(
|
|
851
|
+
f"[DeepAgent] tool_call args buffer 超上限({MAX_ARGS_BUFFER_BYTES}B),"
|
|
852
|
+
f"截断: {existing_tc.get('name')}")
|
|
811
853
|
if tcc_name:
|
|
812
854
|
existing_tc["name"] = tcc_name
|
|
813
855
|
else:
|
|
@@ -1371,6 +1413,7 @@ async def create_deep_agent(
|
|
|
1371
1413
|
recovery_manager=recovery_manager,
|
|
1372
1414
|
rubric_eval_collector=rubric_eval_collector,
|
|
1373
1415
|
sensitive_guard=guard,
|
|
1416
|
+
raw_model=raw_model,
|
|
1374
1417
|
)
|
|
1375
1418
|
|
|
1376
1419
|
|
|
@@ -13,6 +13,7 @@ agent 本就是内部模型(model_tier="internal")时短路放行,不检
|
|
|
13
13
|
检测失败 fail-open(视为不敏感,放行)。
|
|
14
14
|
"""
|
|
15
15
|
import asyncio
|
|
16
|
+
import os
|
|
16
17
|
from typing import Any, Awaitable, Callable, List, Optional
|
|
17
18
|
|
|
18
19
|
from langchain.agents.middleware.types import (
|
|
@@ -113,9 +114,17 @@ DEFAULT_DETECT_PROMPT = """你是数据脱敏分类器。判断以下「即将
|
|
|
113
114
|
|
|
114
115
|
|
|
115
116
|
def _messages_to_text(messages: List[BaseMessage]) -> str:
|
|
116
|
-
"""把 messages 列表拼成检测用文本([Role] content)。
|
|
117
|
+
"""把 messages 列表拼成检测用文本([Role] content)。
|
|
118
|
+
|
|
119
|
+
🔑 OOM 兜底:整段上下文(含历史 + 工具结果)拼成单字符串送检测,
|
|
120
|
+
长对话会涨到几十 MB(join + replace + HumanMessage 3× 放大)。
|
|
121
|
+
超 MAX_DETECT_CONTENT_BYTES 即截断 + 尾注,只截断送检文本,不影响实际对话历史。
|
|
122
|
+
"""
|
|
123
|
+
MAX_BYTES = int(os.environ.get("SENSITIVE_DETECT_MAX_BYTES", 512 * 1024))
|
|
117
124
|
parts = []
|
|
118
|
-
|
|
125
|
+
total = 0
|
|
126
|
+
truncated_at = -1
|
|
127
|
+
for i, m in enumerate(messages):
|
|
119
128
|
role = type(m).__name__
|
|
120
129
|
content = m.content
|
|
121
130
|
if isinstance(content, list):
|
|
@@ -124,8 +133,17 @@ def _messages_to_text(messages: List[BaseMessage]) -> str:
|
|
|
124
133
|
str(c.get("text", "")) if isinstance(c, dict) else str(c)
|
|
125
134
|
for c in content
|
|
126
135
|
)
|
|
127
|
-
|
|
128
|
-
|
|
136
|
+
part = f"[{role}] {content}"
|
|
137
|
+
plen = len(part)
|
|
138
|
+
if total + plen > MAX_BYTES:
|
|
139
|
+
truncated_at = i
|
|
140
|
+
break
|
|
141
|
+
parts.append(part)
|
|
142
|
+
total += plen
|
|
143
|
+
text = "\n".join(parts)
|
|
144
|
+
if truncated_at >= 0:
|
|
145
|
+
text += f"\n...[检测内容已截断,共{len(messages)}条,仅取前{truncated_at}条,上限{MAX_BYTES}B]"
|
|
146
|
+
return text
|
|
129
147
|
|
|
130
148
|
|
|
131
149
|
def _parse_detect_json(text: str) -> Optional[SensitiveCheck]:
|
|
@@ -390,6 +408,18 @@ class SensitiveGuardMiddleware(AgentMiddleware):
|
|
|
390
408
|
self._internal_raw = getattr(llm, "llm", llm)
|
|
391
409
|
return self._internal_raw
|
|
392
410
|
|
|
411
|
+
async def aclose(self):
|
|
412
|
+
"""清理敏感检测懒加载的两个独立 ChatOpenAI 引用(连接池泄漏兜底)。
|
|
413
|
+
|
|
414
|
+
_detector / _internal_raw 是 per-middleware 实例,命中敏感才懒加载。
|
|
415
|
+
🔑 只清引用,不 close 底层 httpx——root_async_client 底层是 langchain
|
|
416
|
+
`_cached_async_httpx_client` 的 @lru_cache 共享实例,close 会让共享该 client 的
|
|
417
|
+
后续请求报 "client has been closed"。底层连接池由 langchain lru_cache 管理。
|
|
418
|
+
供 DeepAgent.cleanup / MultiAgentTeam.cleanup 调用。
|
|
419
|
+
"""
|
|
420
|
+
self._detector = None
|
|
421
|
+
self._internal_raw = None
|
|
422
|
+
|
|
393
423
|
async def _detect(self, messages: List[BaseMessage]) -> SensitiveCheck:
|
|
394
424
|
"""一次检测:命中即返回 SensitiveCheck。fail-open(识别不出来→视为不敏感放行)。
|
|
395
425
|
|
{sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/agent/multi_agent_team.py
RENAMED
|
@@ -51,6 +51,7 @@ from sycommon.agent.middleware.sensitive_guard import (
|
|
|
51
51
|
)
|
|
52
52
|
from deepagents.middleware.summarization import create_summarization_tool_middleware # noqa: F401 保留 re-export
|
|
53
53
|
from sycommon.agent.summarization_utils import build_summarization_middleware
|
|
54
|
+
from sycommon.agent.resume_compactor import maybe_compact_before_resume
|
|
54
55
|
|
|
55
56
|
if TYPE_CHECKING:
|
|
56
57
|
from deepagents.graph import CompiledStateGraph
|
|
@@ -200,6 +201,7 @@ class MultiAgentTeam:
|
|
|
200
201
|
recovery_manager: Optional[SandboxRecoveryManager] = None,
|
|
201
202
|
downgrade_state: Optional[DowngradeState] = None,
|
|
202
203
|
sensitive_guard: Optional["SensitiveGuardMiddleware"] = None,
|
|
204
|
+
raw_model: Any = None,
|
|
203
205
|
):
|
|
204
206
|
self.user_id = user_id
|
|
205
207
|
self.agent = agent
|
|
@@ -214,6 +216,8 @@ class MultiAgentTeam:
|
|
|
214
216
|
# (is_downgraded / last_notice_source / set_file_turn_degrade 等),
|
|
215
217
|
# 让单 agent 与 multi-agent 的应用层代码统一走 `getattr(agent, "sensitive_guard", None)`。
|
|
216
218
|
self.sensitive_guard = sensitive_guard
|
|
219
|
+
# 🔑 存协调者 raw_model 引用,供 cleanup 关 LLM client
|
|
220
|
+
self._raw_model = raw_model
|
|
217
221
|
|
|
218
222
|
@property
|
|
219
223
|
def is_downgraded(self) -> bool:
|
|
@@ -221,12 +225,24 @@ class MultiAgentTeam:
|
|
|
221
225
|
return bool(self.downgrade_state and self.downgrade_state.is_downgraded)
|
|
222
226
|
|
|
223
227
|
async def cleanup(self):
|
|
224
|
-
"""
|
|
228
|
+
"""清理资源(沙箱连接 + 敏感检测 client)。
|
|
229
|
+
|
|
230
|
+
🔑 不关 LLM client:root_async_client 底层 httpx 是 langchain lru_cache 共享实例,
|
|
231
|
+
close 会让共享该 client 的后续请求报 "client has been closed"。底层由 lru_cache 管理。
|
|
232
|
+
"""
|
|
225
233
|
if self.sandbox_backend:
|
|
226
234
|
try:
|
|
227
235
|
await self.sandbox_backend.acleanup()
|
|
228
236
|
except Exception:
|
|
229
237
|
pass
|
|
238
|
+
# 🔑 关敏感检测懒加载的两个独立 ChatOpenAI(aclose 内部只清引用,不 close 共享 httpx)
|
|
239
|
+
if self.sensitive_guard is not None:
|
|
240
|
+
try:
|
|
241
|
+
aclose = getattr(self.sensitive_guard, "aclose", None)
|
|
242
|
+
if aclose is not None:
|
|
243
|
+
await aclose()
|
|
244
|
+
except Exception:
|
|
245
|
+
pass
|
|
230
246
|
|
|
231
247
|
async def chat(
|
|
232
248
|
self,
|
|
@@ -257,6 +273,12 @@ class MultiAgentTeam:
|
|
|
257
273
|
_trace_token = SYLogger.set_trace_id(_chat_trace_id)
|
|
258
274
|
|
|
259
275
|
try:
|
|
276
|
+
# 🔑 恢复前主动压缩:thread 超阈值先在存储侧压缩历史再恢复,防全量加载 OOM。
|
|
277
|
+
try:
|
|
278
|
+
await maybe_compact_before_resume(self)
|
|
279
|
+
except Exception as _e:
|
|
280
|
+
SYLogger.warning(f"[ResumeCompact] 恢复前压缩失败(不阻断 chat): {_e}")
|
|
281
|
+
|
|
260
282
|
async for chunk in self._astream_with_retry(
|
|
261
283
|
{"messages": [HumanMessage(content=message)]},
|
|
262
284
|
max_retries=3,
|
|
@@ -595,6 +617,9 @@ async def create_multi_agent_team(
|
|
|
595
617
|
thinking=config.model_thinking,
|
|
596
618
|
wrap_structured=False,
|
|
597
619
|
)
|
|
620
|
+
# 🔑 提取 raw_model(LLMWithTokenTracking 包装的底层 ChatOpenAI),
|
|
621
|
+
# 供 MultiAgentTeam.cleanup 关 root_async_client(LLM client 连接池泄漏兜底)。
|
|
622
|
+
raw_model = getattr(model, 'llm', model)
|
|
598
623
|
|
|
599
624
|
# 创建 checkpointer
|
|
600
625
|
if checkpointer is None:
|
|
@@ -731,6 +756,7 @@ async def create_multi_agent_team(
|
|
|
731
756
|
recovery_manager=recovery_manager,
|
|
732
757
|
downgrade_state=shared_downgrade_state,
|
|
733
758
|
sensitive_guard=coord_guard,
|
|
759
|
+
raw_model=raw_model,
|
|
734
760
|
)
|
|
735
761
|
|
|
736
762
|
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"""恢复前主动压缩(resume-time compaction)—— 防 PG checkpoint 全量加载 OOM。
|
|
2
|
+
|
|
3
|
+
根因:LangGraph 恢复会话时 `PregelLoop.__aenter__` → `aget_tuple` 用 `array_agg`
|
|
4
|
+
把整个 thread 的所有 messages blob 一次性反序列化进内存(DeltaChannel ancestor
|
|
5
|
+
replay)。单会话 0.5-1GB,多用户并发 N×。现有 SummarizationMiddleware 阈值是
|
|
6
|
+
model-call-time reactive(在下一次 LLM 调用前判断),对「恢复加载时的内存峰值」无效。
|
|
7
|
+
|
|
8
|
+
本模块在 `DeepAgent.chat()` / `MultiAgentTeam.chat()` 入口调用:
|
|
9
|
+
1. 先跑轻量 SQL(绕开 langgraph SELECT_SQL)探测该 thread 的 checkpoint 体量;
|
|
10
|
+
2. 未超阈值 → 直接返回(日常会话零开销);
|
|
11
|
+
3. 超阈值 → 用 langgraph 公开 API `aupdate_state` 复用 deepagents 的压缩链
|
|
12
|
+
(`_determine_cutoff_index`/`_partition_messages`/`_acreate_summary`/`_build_new_messages_with_path`)
|
|
13
|
+
主动压缩一次历史再恢复。这与 reactive summarization 用完全相同的 cutoff 逻辑,
|
|
14
|
+
只是触发时机提前到「恢复之前」,避免丢历史(cutoff 算错才会丢,这里逻辑等价)。
|
|
15
|
+
|
|
16
|
+
只对根 thread(checkpoint_ns='')做;MultiAgentTeam 的子 agent 不挂 checkpointer,
|
|
17
|
+
chat 入口的 thread_id 永远是根。不动 ResilientPostgresSaver(PoolClosed 自愈逻辑很微妙)。
|
|
18
|
+
|
|
19
|
+
阈值用环境变量可调。任何异常只 warning,绝不阻断 chat(恢复失败就走原全量加载路径)。
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
import os
|
|
23
|
+
from typing import Any, Optional
|
|
24
|
+
|
|
25
|
+
from langchain_core.messages import RemoveMessage
|
|
26
|
+
|
|
27
|
+
from sycommon.logging.kafka_log import SYLogger
|
|
28
|
+
|
|
29
|
+
# 阈值(env 可调)。超过才触发主动压缩;日常会话远低于此,零开销。
|
|
30
|
+
MAX_CHECKPOINT_BYTES = int(os.environ.get("CHECKPOINT_MAX_RESUME_BYTES", 50 * 1024 * 1024))
|
|
31
|
+
MAX_CHECKPOINT_WRITES = int(os.environ.get("CHECKPOINT_MAX_RESUME_WRITES", 1000))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
async def _probe_thread_size(thread_id: str) -> tuple[int, int]:
|
|
35
|
+
"""探测 thread 的 checkpoint 体量(绕开 langgraph,自定义轻量 SQL)。
|
|
36
|
+
|
|
37
|
+
Returns:
|
|
38
|
+
(n_writes, total_bytes)。探测失败返回 (0, 0)(当作未超阈值)。
|
|
39
|
+
"""
|
|
40
|
+
try:
|
|
41
|
+
from sycommon.database.pg_checkpoint_service import PgCheckpointService
|
|
42
|
+
if not PgCheckpointService.is_initialized() or not PgCheckpointService._pool:
|
|
43
|
+
return (0, 0)
|
|
44
|
+
pool = PgCheckpointService._pool
|
|
45
|
+
async with pool.connection() as conn:
|
|
46
|
+
cur = await conn.execute(
|
|
47
|
+
"""
|
|
48
|
+
SELECT count(*) AS n, coalesce(sum(octet_length(blob)), 0) AS bytes
|
|
49
|
+
FROM checkpoint_writes
|
|
50
|
+
WHERE thread_id = %s AND checkpoint_ns = ''
|
|
51
|
+
""",
|
|
52
|
+
(thread_id,),
|
|
53
|
+
)
|
|
54
|
+
row = await cur.fetchone()
|
|
55
|
+
if not row:
|
|
56
|
+
return (0, 0)
|
|
57
|
+
return (int(row[0] or 0), int(row[1] or 0))
|
|
58
|
+
except Exception as e:
|
|
59
|
+
SYLogger.warning(f"[ResumeCompact] 探测 thread 大小失败(不压缩): thread={thread_id}, err={e}")
|
|
60
|
+
return (0, 0)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def _find_summarization_middleware(agent: Any) -> Optional[Any]:
|
|
64
|
+
"""在 agent 的 middleware 列表里找 deepagents SummarizationMiddleware 实例。
|
|
65
|
+
|
|
66
|
+
CompiledStateGraph 不直接暴露 middleware 列表,但 deepagents 创建时把 middleware
|
|
67
|
+
挂在 graph 的 nodes 或 metadata 里。这里用 hasattr 兜底:
|
|
68
|
+
- 优先 agent._middleware_list / agent.middleware(若 deepagents 暴露)
|
|
69
|
+
- 否则按属性类型识别(有 _determine_cutoff_index/_partition_messages/_acreate_summary)
|
|
70
|
+
"""
|
|
71
|
+
candidates = []
|
|
72
|
+
for attr in ("middleware", "_middleware_list", "_middlewares", "middleware_list"):
|
|
73
|
+
lst = getattr(agent, attr, None)
|
|
74
|
+
if lst and isinstance(lst, (list, tuple)):
|
|
75
|
+
candidates.extend(lst)
|
|
76
|
+
# 兜底:把整个 graph 的可迭代属性也扫一遍
|
|
77
|
+
if not candidates:
|
|
78
|
+
for attr in dir(agent):
|
|
79
|
+
if attr.startswith("_"):
|
|
80
|
+
continue
|
|
81
|
+
try:
|
|
82
|
+
v = getattr(agent, attr, None)
|
|
83
|
+
except Exception:
|
|
84
|
+
continue
|
|
85
|
+
if hasattr(v, "_determine_cutoff_index") and hasattr(v, "_acreate_summary"):
|
|
86
|
+
candidates.append(v)
|
|
87
|
+
break
|
|
88
|
+
for mw in candidates:
|
|
89
|
+
if hasattr(mw, "_determine_cutoff_index") and hasattr(mw, "_acreate_summary"):
|
|
90
|
+
return mw
|
|
91
|
+
return None
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
async def _compact_thread(agent_holder: Any, thread_id: str) -> bool:
|
|
95
|
+
"""对超阈值 thread 执行主动压缩。返回 True=已压缩,False=跳过/失败。"""
|
|
96
|
+
from langgraph.graph.state import CompiledStateGraph
|
|
97
|
+
|
|
98
|
+
graph = getattr(agent_holder, "agent", None)
|
|
99
|
+
if graph is None:
|
|
100
|
+
return False
|
|
101
|
+
if not isinstance(graph, CompiledStateGraph):
|
|
102
|
+
# 非 CompiledStateGraph(如直接 graph)也支持 aget_state/aupdate_state,继续
|
|
103
|
+
pass
|
|
104
|
+
|
|
105
|
+
config = agent_holder.config
|
|
106
|
+
# 1. 拿当前 state(这一步仍会触发大加载,但仅一次且只在本会话首条)
|
|
107
|
+
try:
|
|
108
|
+
state = await graph.aget_state(config)
|
|
109
|
+
messages = list(getattr(state, "values", {}).get("messages", []) or [])
|
|
110
|
+
except Exception as e:
|
|
111
|
+
SYLogger.warning(f"[ResumeCompact] 获取 state 失败(不压缩): thread={thread_id}, err={e}")
|
|
112
|
+
return False
|
|
113
|
+
|
|
114
|
+
if len(messages) < 10:
|
|
115
|
+
return False # 历史太短,没必要压缩
|
|
116
|
+
|
|
117
|
+
# 2. 找 summarization middleware 复用压缩链
|
|
118
|
+
mw = _find_summarization_middleware(graph)
|
|
119
|
+
if mw is None:
|
|
120
|
+
SYLogger.warning(f"[ResumeCompact] 找不到 SummarizationMiddleware(不压缩): thread={thread_id}")
|
|
121
|
+
return False
|
|
122
|
+
|
|
123
|
+
try:
|
|
124
|
+
cutoff = mw._determine_cutoff_index(messages)
|
|
125
|
+
to_summarize, preserve = mw._partition_messages(messages, cutoff)
|
|
126
|
+
if not to_summarize:
|
|
127
|
+
return False
|
|
128
|
+
summary = await mw._acreate_summary(to_summarize)
|
|
129
|
+
new_msgs = mw._build_new_messages_with_path(summary, None)
|
|
130
|
+
removed = [RemoveMessage(id=m.id) for m in to_summarize if getattr(m, "id", None)]
|
|
131
|
+
|
|
132
|
+
# 3. 用 langgraph 公开 API 写回(等价于把 to_summarize 替换为 new_msgs)
|
|
133
|
+
await graph.aupdate_state(config, {"messages": removed + new_msgs})
|
|
134
|
+
SYLogger.info(
|
|
135
|
+
f"[ResumeCompact] 恢复前压缩完成: thread={thread_id}, "
|
|
136
|
+
f"压缩 {len(to_summarize)} 条→1 条摘要, 保留 {len(preserve)} 条")
|
|
137
|
+
return True
|
|
138
|
+
except Exception as e:
|
|
139
|
+
SYLogger.warning(f"[ResumeCompact] 压缩执行失败(不阻断): thread={thread_id}, err={e}")
|
|
140
|
+
return False
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
async def maybe_compact_before_resume(agent_holder: Any) -> None:
|
|
144
|
+
"""chat 入口调用:若 thread checkpoint 超阈值,先主动压缩历史再恢复。
|
|
145
|
+
|
|
146
|
+
agent_holder 需有 .agent (CompiledStateGraph) 和 .config 属性(DeepAgent/MultiAgentTeam)。
|
|
147
|
+
任何异常只 warning,绝不阻断 chat。
|
|
148
|
+
"""
|
|
149
|
+
try:
|
|
150
|
+
thread_id = (agent_holder.config or {}).get("configurable", {}).get("thread_id")
|
|
151
|
+
if not thread_id:
|
|
152
|
+
return
|
|
153
|
+
n, total_bytes = await _probe_thread_size(thread_id)
|
|
154
|
+
if n < MAX_CHECKPOINT_WRITES and total_bytes < MAX_CHECKPOINT_BYTES:
|
|
155
|
+
SYLogger.debug(
|
|
156
|
+
f"[ResumeCompact] 未超阈值,跳过压缩: thread={thread_id}, "
|
|
157
|
+
f"writes={n}, bytes={total_bytes}")
|
|
158
|
+
return
|
|
159
|
+
SYLogger.info(
|
|
160
|
+
f"[ResumeCompact] 超阈值,触发恢复前压缩: thread={thread_id}, "
|
|
161
|
+
f"writes={n}, bytes={total_bytes}, "
|
|
162
|
+
f"阈值(writes={MAX_CHECKPOINT_WRITES}, bytes={MAX_CHECKPOINT_BYTES})")
|
|
163
|
+
await _compact_thread(agent_holder, thread_id)
|
|
164
|
+
except Exception as e:
|
|
165
|
+
SYLogger.warning(f"[ResumeCompact] 恢复前压缩异常(不阻断 chat): {e}")
|
{sycommon_python_lib-0.2.7a40 → sycommon_python_lib-0.2.7a42}/src/sycommon/agent/sandbox/file_ops.py
RENAMED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import asyncio
|
|
18
18
|
import base64
|
|
19
|
+
import os
|
|
19
20
|
from dataclasses import dataclass
|
|
20
21
|
from typing import Optional, TYPE_CHECKING
|
|
21
22
|
|
|
@@ -40,6 +41,13 @@ if TYPE_CHECKING:
|
|
|
40
41
|
# 沙箱 API 路径前缀
|
|
41
42
|
SANDBOX_API_PREFIX = "/v1/sandbox"
|
|
42
43
|
|
|
44
|
+
# 下载/读取的文件大小预检上限(OOM 兜底,env 可调)。
|
|
45
|
+
# adownload_files 整包读 + base64 解码,agent 调 download 工具读大文件会把全量拉进内存;
|
|
46
|
+
# aread 有行数 limit 但无字节上限。下载/读取前先 astat 拿 size,超限返回 error 让 agent
|
|
47
|
+
# 改用 head/grep/offset+limit 读。astat 异常 fail-open(warning 后继续,避免额外 RPC 失败阻断)。
|
|
48
|
+
MAX_DOWNLOAD_BYTES = int(os.environ.get("SANDBOX_DOWNLOAD_MAX_BYTES", 100 * 1024 * 1024))
|
|
49
|
+
MAX_READ_BYTES = int(os.environ.get("SANDBOX_READ_MAX_BYTES", 10 * 1024 * 1024))
|
|
50
|
+
|
|
43
51
|
|
|
44
52
|
# 服务端 /edit 返回的自由格式错误串 -> deepagents 标准错误码归一化。
|
|
45
53
|
# 对齐 deepagents 0.6.11 BaseSandbox._map_edit_error 的错误码集合,使
|
|
@@ -404,13 +412,31 @@ class FileOperationsMixin:
|
|
|
404
412
|
await self._lazy_sync_skill_from_path(file_path)
|
|
405
413
|
|
|
406
414
|
await self._ensure_synced_async()
|
|
415
|
+
|
|
416
|
+
# 🔑 OOM 兜底:astat 拿 size(只查 size 不读内容),超字节上限直接返回 error,
|
|
417
|
+
# 让 agent 改用 head/grep/offset+limit 读,避免整文件拉进内存。astat 异常 fail-open。
|
|
418
|
+
try:
|
|
419
|
+
st = await self.astat(path=file_path)
|
|
420
|
+
if st and not getattr(st, "error", None) and getattr(st, "exists", False):
|
|
421
|
+
fsize = getattr(st, "size", 0) or 0
|
|
422
|
+
if fsize > MAX_READ_BYTES:
|
|
423
|
+
cap_mb = MAX_READ_BYTES // (1024 * 1024)
|
|
424
|
+
SYLogger.warning(f"[Sandbox] 文件过大拒绝读取: {file_path}, size={fsize}")
|
|
425
|
+
return ReadResult(
|
|
426
|
+
error=f"File '{file_path}': 文件过大({fsize // (1024*1024)}MB > {cap_mb}MB),请用 offset+limit 分页读取或 grep/head 过滤")
|
|
427
|
+
except Exception as se:
|
|
428
|
+
SYLogger.warning(f"[Sandbox] astat 预检失败(继续读取): {se}")
|
|
429
|
+
|
|
430
|
+
# limit=None 时强制限到 2000 行(防御 agent 传无限 limit)
|
|
431
|
+
effective_limit = limit if limit is not None else 2000
|
|
432
|
+
|
|
407
433
|
SYLogger.info(
|
|
408
|
-
f"[Sandbox] 异步读取文件: {file_path} (offset={offset}, limit={
|
|
434
|
+
f"[Sandbox] 异步读取文件: {file_path} (offset={offset}, limit={effective_limit})")
|
|
409
435
|
result = await self._post_async_with_failover(f"{SANDBOX_API_PREFIX}/read", {
|
|
410
436
|
"file_path": file_path,
|
|
411
437
|
"user_id": self.user_id,
|
|
412
438
|
"offset": offset,
|
|
413
|
-
"limit":
|
|
439
|
+
"limit": effective_limit
|
|
414
440
|
}, timeout=timeout)
|
|
415
441
|
# 错误前缀对齐 BaseSandbox._parse_read_output:
|
|
416
442
|
# "File '<path>': <reason>",统一上层错误语义。
|
|
@@ -467,11 +467,18 @@ class HTTPSandboxBackend(FileOperationsMixin, SandboxBackendProtocol):
|
|
|
467
467
|
import asyncio
|
|
468
468
|
loop = asyncio.new_event_loop()
|
|
469
469
|
try:
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
470
|
+
try:
|
|
471
|
+
# 🔑 restore 任何异常(含 MINIO_RESTORE_MAX_BYTES 字节上限提前结束)
|
|
472
|
+
# 都绝不阻断故障转移切换——这里吞掉异常只记日志,
|
|
473
|
+
# 会话末尾的全量扫描会兜底补齐缺失文件。
|
|
474
|
+
restored = loop.run_until_complete(
|
|
475
|
+
minio.restore_from_minio(self, self._user_id))
|
|
476
|
+
workspace_restored = restored > 0
|
|
477
|
+
SYLogger.info(
|
|
478
|
+
f"[Sandbox] MinIO 恢复完成: {restored} 个文件")
|
|
479
|
+
except Exception as re:
|
|
480
|
+
SYLogger.warning(
|
|
481
|
+
f"[Sandbox] MinIO 恢复异常(不阻断切换): {re}")
|
|
475
482
|
finally:
|
|
476
483
|
# restore_from_minio 复用了共享 backend self,内部经
|
|
477
484
|
# aupload_files -> _get_async_session() 的 loop 不匹配逻辑,
|
|
@@ -494,7 +501,7 @@ class HTTPSandboxBackend(FileOperationsMixin, SandboxBackendProtocol):
|
|
|
494
501
|
loop.close()
|
|
495
502
|
except Exception as e:
|
|
496
503
|
SYLogger.warning(
|
|
497
|
-
f"[Sandbox] MinIO
|
|
504
|
+
f"[Sandbox] MinIO 恢复失败(不阻断切换): {e}")
|
|
498
505
|
|
|
499
506
|
if not workspace_restored:
|
|
500
507
|
SYLogger.info(
|
|
@@ -544,13 +551,13 @@ class HTTPSandboxBackend(FileOperationsMixin, SandboxBackendProtocol):
|
|
|
544
551
|
last_exc: Optional[Exception] = None
|
|
545
552
|
|
|
546
553
|
url = f"{self._base_url}{endpoint}"
|
|
547
|
-
SYLogger.
|
|
554
|
+
SYLogger.debug(
|
|
548
555
|
f"[Sandbox] POST 请求开始: {url}, timeout={http_timeout}s, command_timeout={actual_timeout}s")
|
|
549
556
|
|
|
550
557
|
skip_in_place = False
|
|
551
558
|
for attempt in range(max_retries):
|
|
552
559
|
try:
|
|
553
|
-
SYLogger.
|
|
560
|
+
SYLogger.debug(
|
|
554
561
|
f"[Sandbox] POST 尝试 {attempt + 1}/{max_retries}: {url}")
|
|
555
562
|
resp = requests.post(
|
|
556
563
|
url,
|
|
@@ -558,13 +565,13 @@ class HTTPSandboxBackend(FileOperationsMixin, SandboxBackendProtocol):
|
|
|
558
565
|
headers=headers if headers else None,
|
|
559
566
|
timeout=http_timeout
|
|
560
567
|
)
|
|
561
|
-
SYLogger.
|
|
568
|
+
SYLogger.debug(f"[Sandbox] POST 响应状态码: {resp.status_code}")
|
|
562
569
|
if resp.status_code >= 400:
|
|
563
570
|
SYLogger.error(
|
|
564
571
|
f"[Sandbox] HTTP 错误 {resp.status_code}: {resp.text}")
|
|
565
572
|
resp.raise_for_status()
|
|
566
573
|
result = resp.json()
|
|
567
|
-
SYLogger.
|
|
574
|
+
SYLogger.debug(f"[Sandbox] POST 成功: {url}")
|
|
568
575
|
return result
|
|
569
576
|
|
|
570
577
|
except (requests.exceptions.RequestException, requests.exceptions.HTTPError) as e:
|
|
@@ -626,13 +633,13 @@ class HTTPSandboxBackend(FileOperationsMixin, SandboxBackendProtocol):
|
|
|
626
633
|
headers = self._build_headers()
|
|
627
634
|
|
|
628
635
|
url = f"{self._base_url}{endpoint}"
|
|
629
|
-
SYLogger.
|
|
636
|
+
SYLogger.debug(
|
|
630
637
|
f"[Sandbox] Async POST 请求开始: {url}, timeout={http_timeout}s")
|
|
631
638
|
|
|
632
639
|
timeout_obj = aiohttp.ClientTimeout(total=http_timeout)
|
|
633
640
|
session = await self._get_async_session()
|
|
634
641
|
async with session.post(url, json=data, headers=headers, timeout=timeout_obj) as resp:
|
|
635
|
-
SYLogger.
|
|
642
|
+
SYLogger.debug(f"[Sandbox] Async POST 响应状态码: {resp.status}")
|
|
636
643
|
if resp.status >= 500:
|
|
637
644
|
text = await resp.text()
|
|
638
645
|
SYLogger.error(f"[Sandbox] 服务端错误 {resp.status}: {text}")
|
|
@@ -644,7 +651,7 @@ class HTTPSandboxBackend(FileOperationsMixin, SandboxBackendProtocol):
|
|
|
644
651
|
SYLogger.error(f"[Sandbox] HTTP 错误 {resp.status}: {text}")
|
|
645
652
|
resp.raise_for_status()
|
|
646
653
|
result = await resp.json()
|
|
647
|
-
SYLogger.
|
|
654
|
+
SYLogger.debug(f"[Sandbox] Async POST 成功: {url}")
|
|
648
655
|
return result
|
|
649
656
|
|
|
650
657
|
async def _post_async_with_failover(self, endpoint: str, data: dict, timeout: int = None) -> dict:
|
|
@@ -806,9 +813,9 @@ class HTTPSandboxBackend(FileOperationsMixin, SandboxBackendProtocol):
|
|
|
806
813
|
def execute(self, command: str, *, timeout: int = None) -> ExecuteResponse:
|
|
807
814
|
"""执行 shell 命令(服务端负责路径隔离和目录初始化)"""
|
|
808
815
|
command = self._inject_env(command)
|
|
809
|
-
SYLogger.
|
|
816
|
+
SYLogger.debug(f"[Sandbox] execute 开始: command={command}")
|
|
810
817
|
self._ensure_synced_sync()
|
|
811
|
-
SYLogger.
|
|
818
|
+
SYLogger.debug(f"[Sandbox] _ensure_synced_sync 完成,开始执行命令: {command}")
|
|
812
819
|
try:
|
|
813
820
|
result = self._post_sync(f"{SANDBOX_API_PREFIX}/execute", {
|
|
814
821
|
"command": command.strip(),
|
|
@@ -820,7 +827,7 @@ class HTTPSandboxBackend(FileOperationsMixin, SandboxBackendProtocol):
|
|
|
820
827
|
exit_code=result["exit_code"],
|
|
821
828
|
truncated=result.get("truncated", False)
|
|
822
829
|
)
|
|
823
|
-
SYLogger.
|
|
830
|
+
SYLogger.debug(
|
|
824
831
|
f"[Sandbox] 执行完成: exit_code={response.exit_code}, output={response.output[:500] if response.output else 'None'}...")
|
|
825
832
|
return response
|
|
826
833
|
except Exception as e:
|
|
@@ -841,14 +848,14 @@ class HTTPSandboxBackend(FileOperationsMixin, SandboxBackendProtocol):
|
|
|
841
848
|
避免删前先传、比对前先传的往返浪费)。
|
|
842
849
|
"""
|
|
843
850
|
command = self._inject_env(command)
|
|
844
|
-
SYLogger.
|
|
851
|
+
SYLogger.debug(f"[Sandbox] aexecute 开始: command={command}")
|
|
845
852
|
|
|
846
853
|
# 按需懒同步:检测命令中是否引用了 skill 资源
|
|
847
854
|
if not _skip_lazy_sync:
|
|
848
855
|
await self._lazy_sync_skill_from_path(command)
|
|
849
856
|
|
|
850
857
|
await self._ensure_synced_async()
|
|
851
|
-
SYLogger.
|
|
858
|
+
SYLogger.debug(f"[Sandbox] _ensure_synced_async 完成,开始执行命令: {command}")
|
|
852
859
|
try:
|
|
853
860
|
result = await self._post_async_with_failover(f"{SANDBOX_API_PREFIX}/execute", {
|
|
854
861
|
"command": command.strip(),
|
|
@@ -860,7 +867,7 @@ class HTTPSandboxBackend(FileOperationsMixin, SandboxBackendProtocol):
|
|
|
860
867
|
exit_code=result["exit_code"],
|
|
861
868
|
truncated=result.get("truncated", False)
|
|
862
869
|
)
|
|
863
|
-
SYLogger.
|
|
870
|
+
SYLogger.debug(f"[Sandbox] 异步执行完成: exit_code={response.exit_code}")
|
|
864
871
|
return response
|
|
865
872
|
except Exception as e:
|
|
866
873
|
SYLogger.error(f"[Sandbox] 异步执行异常: {e}")
|
|
@@ -1190,10 +1197,31 @@ class HTTPSandboxBackend(FileOperationsMixin, SandboxBackendProtocol):
|
|
|
1190
1197
|
return results
|
|
1191
1198
|
|
|
1192
1199
|
async def adownload_files(self, paths: List[str], *, timeout: int = None) -> List[FileDownloadResponse]:
|
|
1193
|
-
"""异步下载多个文件(真正的异步实现)
|
|
1200
|
+
"""异步下载多个文件(真正的异步实现)
|
|
1201
|
+
|
|
1202
|
+
🔑 OOM 兜底:每个文件下载前先 astat 拿 size(只查 size 不读内容),
|
|
1203
|
+
超 MAX_DOWNLOAD_BYTES 直接返回 error,避免整包读 + base64 解码把全量拉进内存。
|
|
1204
|
+
astat 异常 fail-open(warning 后继续下载)。
|
|
1205
|
+
"""
|
|
1206
|
+
from sycommon.agent.sandbox.file_ops import MAX_DOWNLOAD_BYTES
|
|
1194
1207
|
results = []
|
|
1195
1208
|
for path in paths:
|
|
1196
1209
|
try:
|
|
1210
|
+
# 大小预检:超限直接拒绝,不下载
|
|
1211
|
+
try:
|
|
1212
|
+
st = await self.astat(path=path)
|
|
1213
|
+
if st and not getattr(st, "error", None) and getattr(st, "exists", False):
|
|
1214
|
+
fsize = getattr(st, "size", 0) or 0
|
|
1215
|
+
if fsize > MAX_DOWNLOAD_BYTES:
|
|
1216
|
+
cap_mb = MAX_DOWNLOAD_BYTES // (1024 * 1024)
|
|
1217
|
+
SYLogger.warning(f"[Sandbox] 文件过大拒绝下载: {path}, size={fsize}")
|
|
1218
|
+
results.append(FileDownloadResponse(
|
|
1219
|
+
path=path,
|
|
1220
|
+
error=f"file too large ({fsize // (1024*1024)}MB > {cap_mb}MB)"))
|
|
1221
|
+
continue
|
|
1222
|
+
except Exception as se:
|
|
1223
|
+
SYLogger.warning(f"[Sandbox] astat 预检失败(继续下载): {se}")
|
|
1224
|
+
|
|
1197
1225
|
result = await self._post_async_with_failover(
|
|
1198
1226
|
f"{SANDBOX_API_PREFIX}/download",
|
|
1199
1227
|
{"path": path, "user_id": self._user_id},
|