sycommon-python-lib 0.2.7a41__tar.gz → 0.2.7a43__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.7a41 → sycommon_python_lib-0.2.7a43}/PKG-INFO +5 -5
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/pyproject.toml +5 -5
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/agent/deep_agent.py +67 -4
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/agent/middleware/sensitive_guard.py +34 -4
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/agent/middleware/skill_api_whitelist.py +4 -4
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/agent/middleware/skill_write_guard.py +16 -7
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/agent/multi_agent_team.py +27 -1
- sycommon_python_lib-0.2.7a43/src/sycommon/agent/resume_compactor.py +165 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/agent/sandbox/file_ops.py +28 -2
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/agent/sandbox/http_sandbox_backend.py +35 -14
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/agent/sandbox/minio_sync.py +14 -1
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/agent/summarization_utils.py +6 -6
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/llm/sy_langfuse.py +13 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/middleware/tool_result_truncation.py +5 -4
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon_python_lib.egg-info/PKG-INFO +5 -5
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon_python_lib.egg-info/SOURCES.txt +1 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon_python_lib.egg-info/requires.txt +4 -4
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/README.md +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/setup.cfg +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/cli.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/core/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/core/console.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/core/models.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/core/project.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/core/utils.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/agent/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/agent/agent/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/agent/agent/main_agent.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/agent/agent/nodes/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/agent/agent/nodes/example_node.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/agent/agent/states/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/agent/agent/states/agent_state.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/agent/api/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/agent/api/query.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/agent/api/sse/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/agent/api/sse/agent.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/agent/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/agent/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/agent/db/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/agent/db/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/agent/db/model/entity.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/agent/db/service.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/agent/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/agent/model/parse.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/agent/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/agent/tools/mq.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/base/.env.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/base/.gitignore.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/base/Dockerfile.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/base/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/base/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/base/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/base/app.yaml.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/base/client/FileServiceClient.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/base/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/base/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/base/model/file_info.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/base/requirements.txt.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/cli/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/cli/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/cli/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/cli/commands/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/cli/commands/hello.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/cli/pyproject.toml.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/cli/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/web/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/web/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/web/api/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/web/api/echo.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/web/api/sse/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/web/api/sse/echo.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/web/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/web/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/web/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/web/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/command/templates/web/tools/mq.py.tpl +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/nexus/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/__main__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/acp/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/acp/config.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/acp/executor.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/acp/registry.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/acp/server.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/agents/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/agents/factory.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/agents/prompts.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/cdp/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/cdp/browser.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/cdp/capabilities/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/cdp/capabilities/console.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/cdp/capabilities/dom.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/cdp/capabilities/network.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/cdp/capabilities/page_errors.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/cdp/capabilities/performance.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/cdp/capabilities/screenshot.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/cdp/client.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/cdp/protocol.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/cdp/repl.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/cli.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/commands/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/commands/acp_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/commands/cdp_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/commands/chat_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/commands/create_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/commands/evaluate_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/commands/init_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/commands/memory_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/commands/resume_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/commands/rollback_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/commands/run_cmd.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/core/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/core/backend.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/core/config.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/core/display.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/core/git_integration.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/core/llm.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/core/state.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/evaluate/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/evaluate/api_evaluator.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/memory/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/memory/compressor.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/memory/full.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/memory/hot.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/memory/manager.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/memory/warm.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/mode/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/mode/create.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/mode/optimize.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/models/config_models.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/rl/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/rl/baseline_tests.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/rl/checkpoint.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/rl/convergence.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/rl/diagnosis.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/rl/engine.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/rl/environment.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/rl/experience.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/rl/harness_prompts.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/rl/history.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/rl/optimization_logger.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/rl/pre_validation.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/rl/reward.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/rl/strategy_bandit.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/rl/strategy_generator.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/rl/strategy_prompts.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/simple_chat_agent.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycli/skills/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/agent/acp/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/agent/acp/client.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/agent/acp/fetch.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/agent/acp/ssh_init.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/agent/acp/tool.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/agent/agent_manager.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/agent/chat_events.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/agent/mcp/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/agent/mcp/models.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/agent/mcp/tool_loader.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/agent/middleware/sandbox_path_guard.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/agent/middleware/sitecustomize.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/agent/middleware/skill_wl_check.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/agent/sandbox/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/agent/sandbox/consistent_hash.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/agent/sandbox/sandbox_pool.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/agent/sandbox/sandbox_recovery.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/agent/sandbox/session.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/auth/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/auth/ldap_service.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/auth/oa_cache.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/auth/oa_crypto.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/auth/oa_service.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/auth/wecom_ldap_service.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/config/ACPAgentConfig.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/config/Config.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/config/DatabaseConfig.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/config/ElasticsearchConfig.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/config/EmbeddingConfig.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/config/LLMConfig.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/config/LangfuseConfig.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/config/MQConfig.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/config/PgConfig.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/config/RedisConfig.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/config/RerankerConfig.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/config/SentryConfig.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/config/SkillApiWhitelistConfig.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/config/XxlJobConfig.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/config/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/config/config_change_notifier.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/database/async_base_db_service.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/database/async_database_service.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/database/base_db_service.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/database/database_service.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/database/elasticsearch_service.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/database/pg_checkpoint_service.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/database/redis_service.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/database/resilient_pg_saver.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/database/token_usage_db_service.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/health/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/health/health_check.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/health/metrics.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/health/ping.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/heartbeat_process/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/heartbeat_process/heartbeat_config.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/heartbeat_process/heartbeat_process_manager.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/heartbeat_process/heartbeat_process_worker.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/llm/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/llm/embedding.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/llm/get_llm.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/llm/llm_logger.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/llm/llm_tokens.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/llm/llm_with_token_tracking.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/llm/native_with_fallback_runnable.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/llm/output_fixing_runnable.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/llm/struct_token.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/llm/tiktoken_cache/9b5ad71b2ce5302211f9c61530b329a4922fc6a4 +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/llm/tiktoken_cache/fb374d419588a4632f3f557e76b4b70aebbca790 +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/llm/token_usage_es_service.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/llm/token_usage_mysql_service.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/llm/token_utils.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/llm/usage_token.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/logging/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/logging/async_sql_logger.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/logging/kafka_log.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/logging/log_masker.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/logging/logger_levels.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/logging/logger_wrapper.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/logging/process_logger.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/logging/sql_logger.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/mcp_server/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/mcp_server/server.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/middleware/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/middleware/context.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/middleware/cors.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/middleware/docs.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/middleware/exception.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/middleware/middleware.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/middleware/monitor_memory.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/middleware/mq.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/middleware/sandbox.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/middleware/timeout.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/middleware/token_tracking.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/middleware/traceid.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/models/base_http.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/models/log.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/models/mcp_server_config.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/models/mqlistener_config.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/models/mqmsg_model.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/models/mqsend_config.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/models/sandbox.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/models/sso_user.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/models/token_usage.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/models/token_usage_mysql.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/models/xxljob_handler_config.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/notice/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/notice/uvicorn_monitor.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/notice/wecom_message.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/rabbitmq/process_pool_consumer.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/rabbitmq/rabbitmq_client.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/rabbitmq/rabbitmq_pool.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/rabbitmq/rabbitmq_service.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/rabbitmq/rabbitmq_service_client_manager.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/rabbitmq/rabbitmq_service_connection_monitor.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/rabbitmq/rabbitmq_service_consumer_manager.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/rabbitmq/rabbitmq_service_core.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/rabbitmq/rabbitmq_service_producer_manager.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/sentry/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/sentry/sy_sentry.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/services.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/sse/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/sse/event.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/sse/sse.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/synacos/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/synacos/example.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/synacos/example2.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/synacos/feign.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/synacos/feign_client.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/synacos/nacos_client_base.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/synacos/nacos_config_manager.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/synacos/nacos_heartbeat_manager.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/synacos/nacos_service.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/synacos/nacos_service_discovery.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/synacos/nacos_service_registration.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/synacos/param.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/tests/deep_agent_server.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/tests/test_consistent_hash.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/tests/test_consumer_loss_rootcause.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/tests/test_consumer_recovery.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/tests/test_deep_agent.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/tests/test_dynamic_max_tokens.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/tests/test_email.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/tests/test_encoding_cache.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/tests/test_fix_verification.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/tests/test_mcp_server.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/tests/test_minimax_reasoning.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/tests/test_mq.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/tests/test_oa_login.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/tests/test_queue_priority_fallback.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/tests/test_real_summarization.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/tests/test_summarization_config.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/tests/test_summarization_real.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/tests/test_summary_leak_e2e.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/tests/test_upgrade_aio_pika.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/tests/test_upgrade_langgraph_stream.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/tests/test_upgrade_verification.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/tools/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/tools/async_utils.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/tools/docs.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/tools/env.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/tools/merge_headers.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/tools/snowflake.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/tools/syemail.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/tools/timing.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/xxljob/__init__.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon/xxljob/xxljob_service.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon_python_lib.egg-info/dependency_links.txt +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon_python_lib.egg-info/entry_points.txt +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/src/sycommon_python_lib.egg-info/top_level.txt +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/tests/test_acp_tool.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/tests/test_asyncio_logging.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/tests/test_config_change_notifier.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/tests/test_hotreload_snapshot.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/tests/test_llm_apikey_contextvar.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/tests/test_log_masker.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/tests/test_resilient_pg_saver.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/tests/test_sandbox_path_guard.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/tests/test_sensitive_guard.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/tests/test_simple_chat_agent.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/tests/test_skill_regex_upgrade.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/tests/test_skill_write_guard.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/tests/test_sycli.py +0 -0
- {sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/tests/test_sync_skills_to_sandbox.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sycommon-python-lib
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.7a43
|
|
4
4
|
Summary: Add your description here
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -11,16 +11,16 @@ Requires-Dist: anyio==4.14.2
|
|
|
11
11
|
Requires-Dist: decorator==5.3.1
|
|
12
12
|
Requires-Dist: deepagents==0.6.12
|
|
13
13
|
Requires-Dist: elasticsearch==9.4.1
|
|
14
|
-
Requires-Dist: fastapi==0.139.
|
|
14
|
+
Requires-Dist: fastapi==0.139.2
|
|
15
15
|
Requires-Dist: jinja2==3.1.6
|
|
16
16
|
Requires-Dist: kafka-python==3.0.8
|
|
17
|
-
Requires-Dist: langchain==1.3.
|
|
17
|
+
Requires-Dist: langchain==1.3.14
|
|
18
18
|
Requires-Dist: langchain-core==1.4.9
|
|
19
19
|
Requires-Dist: langchain-openai==1.3.5
|
|
20
20
|
Requires-Dist: langfuse==4.14.0
|
|
21
21
|
Requires-Dist: langgraph==1.2.9
|
|
22
22
|
Requires-Dist: langgraph-checkpoint-postgres==3.1.0
|
|
23
|
-
Requires-Dist: langgraph-checkpoint-redis==0.5.
|
|
23
|
+
Requires-Dist: langgraph-checkpoint-redis==0.5.1
|
|
24
24
|
Requires-Dist: ldap3==2.9.1
|
|
25
25
|
Requires-Dist: loguru==0.7.3
|
|
26
26
|
Requires-Dist: mysql-connector-python==9.7.0
|
|
@@ -32,7 +32,7 @@ Requires-Dist: python-dotenv==1.2.2
|
|
|
32
32
|
Requires-Dist: python-multipart==0.0.32
|
|
33
33
|
Requires-Dist: pyyaml==6.0.3
|
|
34
34
|
Requires-Dist: redis==7.4.0
|
|
35
|
-
Requires-Dist: sentry-sdk[fastapi]==2.
|
|
35
|
+
Requires-Dist: sentry-sdk[fastapi]==2.66.0
|
|
36
36
|
Requires-Dist: sqlalchemy[asyncio]==2.0.51
|
|
37
37
|
Requires-Dist: starlette[full]==1.3.1
|
|
38
38
|
Requires-Dist: tiktoken==0.13.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "sycommon-python-lib"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.7a43"
|
|
4
4
|
description = "Add your description here"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
@@ -12,16 +12,16 @@ dependencies = [
|
|
|
12
12
|
"decorator==5.3.1",
|
|
13
13
|
"deepagents==0.6.12",
|
|
14
14
|
"elasticsearch==9.4.1",
|
|
15
|
-
"fastapi==0.139.
|
|
15
|
+
"fastapi==0.139.2",
|
|
16
16
|
"jinja2==3.1.6",
|
|
17
17
|
"kafka-python==3.0.8",
|
|
18
|
-
"langchain==1.3.
|
|
18
|
+
"langchain==1.3.14",
|
|
19
19
|
"langchain-core==1.4.9",
|
|
20
20
|
"langchain-openai==1.3.5",
|
|
21
21
|
"langfuse==4.14.0",
|
|
22
22
|
"langgraph==1.2.9",
|
|
23
23
|
"langgraph-checkpoint-postgres==3.1.0",
|
|
24
|
-
"langgraph-checkpoint-redis==0.5.
|
|
24
|
+
"langgraph-checkpoint-redis==0.5.1",
|
|
25
25
|
"ldap3==2.9.1",
|
|
26
26
|
"loguru==0.7.3",
|
|
27
27
|
"mysql-connector-python==9.7.0",
|
|
@@ -33,7 +33,7 @@ dependencies = [
|
|
|
33
33
|
"python-multipart==0.0.32",
|
|
34
34
|
"pyyaml==6.0.3",
|
|
35
35
|
"redis==7.4.0",
|
|
36
|
-
"sentry-sdk[fastapi]==2.
|
|
36
|
+
"sentry-sdk[fastapi]==2.66.0",
|
|
37
37
|
"sqlalchemy[asyncio]==2.0.51",
|
|
38
38
|
"starlette[full]==1.3.1",
|
|
39
39
|
"tiktoken==0.13.0",
|
{sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/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
|
|
@@ -392,6 +398,13 @@ class AgentConfig(BaseModel):
|
|
|
392
398
|
# user 技能:标记启用沙箱 /skills/user(可写,内容由 MinIO 按 user 灌入);
|
|
393
399
|
# 本地兜底路径仅当目录存在时用于开发期同步,生产期为 None。
|
|
394
400
|
user_skills_dir: Optional[str] = None
|
|
401
|
+
# 接口专属技能:本地仓库目录路径(如 <repo>/skills/shengye-platform/oa),
|
|
402
|
+
# 同步到沙箱 /skills/<scoped_skills_scope>(只读),并以独立 source 追加到
|
|
403
|
+
# deepagents SkillsMiddleware,优先级高于 system/user(后 source 覆盖先 source)。
|
|
404
|
+
# 使用方:按接口路由在服务端硬编码 scope,前端不可改。
|
|
405
|
+
scoped_skills_dir: Optional[str] = None
|
|
406
|
+
# 沙箱挂载点 scope,如 "shengye-platform/oa"。仅当 scoped_skills_dir 非空时生效。
|
|
407
|
+
scoped_skills_scope: Optional[str] = None
|
|
395
408
|
memory_dir: Optional[str] = None
|
|
396
409
|
|
|
397
410
|
@property
|
|
@@ -460,6 +473,7 @@ class DeepAgent:
|
|
|
460
473
|
recovery_manager: Optional[SandboxRecoveryManager] = None,
|
|
461
474
|
rubric_eval_collector: Optional[_RubricEvalCollector] = None,
|
|
462
475
|
sensitive_guard: Optional[SensitiveGuardMiddleware] = None,
|
|
476
|
+
raw_model: Any = None,
|
|
463
477
|
):
|
|
464
478
|
self.user_id = user_id
|
|
465
479
|
self.agent = agent
|
|
@@ -468,14 +482,32 @@ class DeepAgent:
|
|
|
468
482
|
self.recovery_manager = recovery_manager
|
|
469
483
|
self.rubric_eval_collector = rubric_eval_collector
|
|
470
484
|
self.sensitive_guard = sensitive_guard
|
|
485
|
+
# 🔑 存 raw_model 引用,供 cleanup 关 LLM client(root_async_client)。
|
|
486
|
+
# model 被埋进 graph 内部节点闭包,表层拿不到,必须 create 时显式传入。
|
|
487
|
+
self._raw_model = raw_model
|
|
471
488
|
|
|
472
489
|
async def cleanup(self):
|
|
473
|
-
"""
|
|
490
|
+
"""清理资源(沙箱连接 + 敏感检测 client)。
|
|
491
|
+
|
|
492
|
+
🔑 不关 LLM client:root_async_client 底层的 httpx.AsyncClient 是 langchain
|
|
493
|
+
`_cached_async_httpx_client` 的 @lru_cache 共享实例(多个 ChatOpenAI 复用同一个),
|
|
494
|
+
close 它会让所有共享该 client 的后续请求报 "Cannot send a request, as the client
|
|
495
|
+
has been closed"。底层连接池由 langchain lru_cache 管理,进程退出时统一回收。
|
|
496
|
+
"""
|
|
474
497
|
if self.sandbox_backend:
|
|
475
498
|
try:
|
|
476
499
|
await self.sandbox_backend.acleanup()
|
|
477
500
|
except Exception:
|
|
478
501
|
pass
|
|
502
|
+
# 🔑 关敏感检测懒加载的两个独立 ChatOpenAI(detector + internal_raw)。
|
|
503
|
+
# 注意:同样不能 close 底层共享 httpx,aclose 内部已按此处理(只清引用)。
|
|
504
|
+
if self.sensitive_guard is not None:
|
|
505
|
+
try:
|
|
506
|
+
aclose = getattr(self.sensitive_guard, "aclose", None)
|
|
507
|
+
if aclose is not None:
|
|
508
|
+
await aclose()
|
|
509
|
+
except Exception:
|
|
510
|
+
pass
|
|
479
511
|
|
|
480
512
|
async def chat(
|
|
481
513
|
self,
|
|
@@ -512,6 +544,14 @@ class DeepAgent:
|
|
|
512
544
|
_trace_token = SYLogger.set_trace_id(_chat_trace_id)
|
|
513
545
|
|
|
514
546
|
try:
|
|
547
|
+
# 🔑 恢复前主动压缩:若该 thread 的 checkpoint 已超过阈值,先在存储侧压缩历史再恢复,
|
|
548
|
+
# 避免每次会话都把全量 messages 反序列化进内存(单会话恢复峰值 0.5-1GB)。
|
|
549
|
+
# 日常会话(未超阈值)零开销。任何异常仅 warning,绝不阻断 chat。
|
|
550
|
+
try:
|
|
551
|
+
await maybe_compact_before_resume(self)
|
|
552
|
+
except Exception as _e:
|
|
553
|
+
SYLogger.warning(f"[ResumeCompact] 恢复前压缩失败(不阻断 chat): {_e}")
|
|
554
|
+
|
|
515
555
|
input_state = {"messages": [HumanMessage(content=message)]}
|
|
516
556
|
if rubric:
|
|
517
557
|
input_state["rubric"] = rubric
|
|
@@ -805,9 +845,18 @@ class DeepAgent:
|
|
|
805
845
|
existing_tc = None
|
|
806
846
|
|
|
807
847
|
if existing_tc:
|
|
808
|
-
# 追加 args
|
|
848
|
+
# 追加 args 字符串片段(🔑 上限防 OOM:模型生成的超大单 tool_call args
|
|
849
|
+
# 如 base64 大文件内容,无上限会涨到几十 MB。超限停止追加,
|
|
850
|
+
# args 保持 {} —— 只影响前端 tool_call 进度展示,工具实际执行不受影响)。
|
|
809
851
|
if tcc_args_str:
|
|
810
|
-
existing_tc
|
|
852
|
+
buf_len = len(existing_tc.get("_args_buffer", ""))
|
|
853
|
+
if buf_len < MAX_ARGS_BUFFER_BYTES:
|
|
854
|
+
existing_tc["_args_buffer"] += tcc_args_str
|
|
855
|
+
elif not existing_tc.get("_args_truncated"):
|
|
856
|
+
existing_tc["_args_truncated"] = True
|
|
857
|
+
SYLogger.warning(
|
|
858
|
+
f"[DeepAgent] tool_call args buffer 超上限({MAX_ARGS_BUFFER_BYTES}B),"
|
|
859
|
+
f"截断: {existing_tc.get('name')}")
|
|
811
860
|
if tcc_name:
|
|
812
861
|
existing_tc["name"] = tcc_name
|
|
813
862
|
else:
|
|
@@ -1236,6 +1285,12 @@ async def create_deep_agent(
|
|
|
1236
1285
|
# 沙箱 skills 双层结构:/skills/system(只读,仓库源)+ /skills/user(可写,MinIO 按 user 灌入)
|
|
1237
1286
|
system_path = "/skills/system" if config.system_skills_dir else None
|
|
1238
1287
|
user_path = "/skills/user" if config.user_skills_dir else None
|
|
1288
|
+
# 接口专属技能挂载点(如 "/skills/shengye-platform/oa"),仅当 dir+scope 同时非空才启用
|
|
1289
|
+
scoped_path = (
|
|
1290
|
+
f"/skills/{config.scoped_skills_scope}"
|
|
1291
|
+
if config.scoped_skills_dir and config.scoped_skills_scope
|
|
1292
|
+
else None
|
|
1293
|
+
)
|
|
1239
1294
|
memory_path = "/memory/AGENTS.md" if config.memory_dir else None
|
|
1240
1295
|
|
|
1241
1296
|
# 同步 system 技能到沙箱(按版本检查,已同步则跳过)+ chmod 只读保护
|
|
@@ -1247,6 +1302,11 @@ async def create_deep_agent(
|
|
|
1247
1302
|
await _sync_skills_to_sandbox(config.system_skills_dir, sandbox_backend,
|
|
1248
1303
|
sandbox_dest="/skills/system", chmod_readonly=True)
|
|
1249
1304
|
|
|
1305
|
+
# 同步接口专属技能到沙箱(只读)。与 system 同一套 version 感知增量同步机制。
|
|
1306
|
+
if config.scoped_skills_dir and config.scoped_skills_scope and sandbox_backend:
|
|
1307
|
+
await _sync_skills_to_sandbox(config.scoped_skills_dir, sandbox_backend,
|
|
1308
|
+
sandbox_dest=scoped_path, chmod_readonly=True)
|
|
1309
|
+
|
|
1250
1310
|
# 创建 agent
|
|
1251
1311
|
from deepagents import create_deep_agent as _create_deep_agent
|
|
1252
1312
|
from deepagents import RubricMiddleware
|
|
@@ -1317,12 +1377,14 @@ async def create_deep_agent(
|
|
|
1317
1377
|
"middleware": middleware_list,
|
|
1318
1378
|
}
|
|
1319
1379
|
# deepagents SkillsMiddleware 支持多 source (path, label),后 source 覆盖先 source
|
|
1320
|
-
# → user 在后,user 同名技能优先于 system
|
|
1380
|
+
# → user 在后,user 同名技能优先于 system;scoped 放最后,接口专属技能优先级最高
|
|
1321
1381
|
_sources = []
|
|
1322
1382
|
if system_path:
|
|
1323
1383
|
_sources.append((system_path, "系统"))
|
|
1324
1384
|
if user_path:
|
|
1325
1385
|
_sources.append((user_path, "用户"))
|
|
1386
|
+
if scoped_path:
|
|
1387
|
+
_sources.append((scoped_path, "接口"))
|
|
1326
1388
|
if _sources:
|
|
1327
1389
|
agent_kwargs["skills"] = _sources
|
|
1328
1390
|
if memory_path:
|
|
@@ -1371,6 +1433,7 @@ async def create_deep_agent(
|
|
|
1371
1433
|
recovery_manager=recovery_manager,
|
|
1372
1434
|
rubric_eval_collector=rubric_eval_collector,
|
|
1373
1435
|
sensitive_guard=guard,
|
|
1436
|
+
raw_model=raw_model,
|
|
1374
1437
|
)
|
|
1375
1438
|
|
|
1376
1439
|
|
|
@@ -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
|
|
|
@@ -35,11 +35,11 @@ from sycommon.logging.kafka_log import SYLogger
|
|
|
35
35
|
|
|
36
36
|
# 命令路径形如 skills/system/sy-oa-skill/workflow-todo/scripts/x.py
|
|
37
37
|
# skills/user/sy-oa-skill/SKILL.md
|
|
38
|
-
# 拆为 system/user
|
|
39
|
-
# (如 sy-oa-skill),配合 SkillApiWhitelist
|
|
40
|
-
# (?<![\w]) 否定左查找:要求 skills 前不是单词字符,避免误匹配 myskills/。
|
|
38
|
+
# 拆为 system/user/shengye-platform 多层后,顶层段是 system|user|shengye-platform,
|
|
39
|
+
# 需跳过它取【第二段】作域级技能名(如 sy-oa-skill / oa),配合 SkillApiWhitelist
|
|
40
|
+
# 按顶级域配置。(?<![\w]) 否定左查找:要求 skills 前不是单词字符,避免误匹配 myskills/。
|
|
41
41
|
_SKILL_TOP_RE = re.compile(
|
|
42
|
-
r'(?<![\w])skills/(?:system|user)/([A-Za-z0-9_\-]+)(?:/|$)')
|
|
42
|
+
r'(?<![\w])skills/(?:system|user|shengye-platform)/([A-Za-z0-9_\-]+)(?:/|$)')
|
|
43
43
|
|
|
44
44
|
# BASE_URL 占位符 ${VAR}
|
|
45
45
|
_PLACEHOLDER_RE = re.compile(r'\$\{([A-Z_][A-Z0-9_]*)\}')
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"""系统技能只读守卫中间件。
|
|
2
2
|
|
|
3
|
-
拦 write_file / edit_file / execute
|
|
4
|
-
返回 error ToolMessage(不调 handler,短路)
|
|
3
|
+
拦 write_file / edit_file / execute 三类写操作对以下只读路径的命中,
|
|
4
|
+
返回 error ToolMessage(不调 handler,短路):
|
|
5
|
+
- /skills/system —— 全员共享系统技能
|
|
6
|
+
- /skills/shengye-platform —— 接口专属技能(按接口 scope 挂载)
|
|
5
7
|
|
|
6
|
-
|
|
8
|
+
/skills/user 不拦。
|
|
9
|
+
|
|
10
|
+
双层防护之一(另一层是沙箱 chmod -R 555 对应目录):
|
|
7
11
|
本中间件负责给 agent 清晰错误反馈并 fail-closed,chmod 负责兜底防 shell 绕过。
|
|
8
12
|
"""
|
|
9
13
|
import re
|
|
@@ -11,8 +15,10 @@ from langchain.agents.middleware.types import AgentMiddleware
|
|
|
11
15
|
from langchain_core.messages import ToolMessage
|
|
12
16
|
from langgraph.prebuilt.tool_node import ToolCallRequest
|
|
13
17
|
|
|
14
|
-
# /skills/system 或 /skills/
|
|
15
|
-
|
|
18
|
+
# /skills/system 或 /skills/shengye-platform 及其子路径
|
|
19
|
+
# (行尾/引号/空白/斜杠均可作边界,防匹配 /skills/systembackup 这类同前缀异名)
|
|
20
|
+
_PROTECTED_PATH_RE = re.compile(
|
|
21
|
+
r'/skills/(?:system|shengye-platform)(?:/|\s|"|\'|$)')
|
|
16
22
|
|
|
17
23
|
# 写动作动词(命令首或分号/管道/空格后)
|
|
18
24
|
_WRITE_VERB_RE = re.compile(
|
|
@@ -21,14 +27,17 @@ _WRITE_VERB_RE = re.compile(
|
|
|
21
27
|
_REDIRECT_RE = re.compile(r'>>?')
|
|
22
28
|
|
|
23
29
|
_WRITE_TOOLS = {"write_file", "edit_file"}
|
|
24
|
-
_DENIED_MSG = ("Error:
|
|
30
|
+
_DENIED_MSG = ("Error: 系统/接口技能 /skills/system 与 /skills/shengye-platform 为只读,禁止写入/修改/删除。"
|
|
25
31
|
"读取(read_file)和执行脚本(python ...)不受限,直接用即可,不要把脚本复制到工作目录再跑。"
|
|
26
32
|
"如需修改脚本本身,复制到 /skills/user/ 后编辑。")
|
|
27
33
|
|
|
34
|
+
# 前缀列表(用于 _is_protected_path 的字符串判定)
|
|
35
|
+
_PROTECTED_PREFIXES = ("/skills/system", "/skills/shengye-platform")
|
|
36
|
+
|
|
28
37
|
|
|
29
38
|
def _is_protected_path(p: str) -> bool:
|
|
30
39
|
s = (p or "").strip().replace("\\", "/")
|
|
31
|
-
return s ==
|
|
40
|
+
return any(s == prefix or s.startswith(prefix + "/") for prefix in _PROTECTED_PREFIXES)
|
|
32
41
|
|
|
33
42
|
|
|
34
43
|
def _command_writes_system(cmd: str) -> bool:
|
{sycommon_python_lib-0.2.7a41 → sycommon_python_lib-0.2.7a43}/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.7a41 → sycommon_python_lib-0.2.7a43}/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>",统一上层错误语义。
|