sycommon-python-lib 0.2.5a36__tar.gz → 0.2.5a38__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.5a36 → sycommon_python_lib-0.2.5a38}/PKG-INFO +1 -1
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/pyproject.toml +1 -1
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/agent/deep_agent.py +184 -110
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/agent/multi_agent_team.py +13 -8
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/agent/sandbox/file_ops.py +21 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/agent/sandbox/http_sandbox_backend.py +128 -25
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/agent/sandbox/minio_sync.py +45 -3
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/auth/wecom_ldap_service.py +87 -3
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon_python_lib.egg-info/PKG-INFO +1 -1
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/README.md +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/setup.cfg +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/cli.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/core/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/core/console.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/core/models.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/core/project.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/core/utils.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/agent/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/agent/agent/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/agent/agent/main_agent.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/agent/agent/nodes/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/agent/agent/nodes/example_node.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/agent/agent/states/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/agent/agent/states/agent_state.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/agent/api/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/agent/api/query.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/agent/api/sse/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/agent/api/sse/agent.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/agent/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/agent/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/agent/db/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/agent/db/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/agent/db/model/entity.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/agent/db/service.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/agent/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/agent/model/parse.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/agent/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/agent/tools/mq.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/base/.env.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/base/.gitignore.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/base/Dockerfile.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/base/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/base/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/base/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/base/app.yaml.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/base/client/FileServiceClient.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/base/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/base/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/base/model/file_info.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/base/requirements.txt.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/cli/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/cli/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/cli/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/cli/commands/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/cli/commands/hello.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/cli/pyproject.toml.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/cli/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/web/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/web/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/web/api/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/web/api/echo.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/web/api/sse/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/web/api/sse/echo.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/web/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/web/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/web/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/web/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/command/templates/web/tools/mq.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/nexus/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/__main__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/agents/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/agents/factory.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/agents/prompts.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/cdp/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/cdp/browser.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/cdp/capabilities/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/cdp/capabilities/console.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/cdp/capabilities/dom.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/cdp/capabilities/network.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/cdp/capabilities/page_errors.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/cdp/capabilities/performance.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/cdp/capabilities/screenshot.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/cdp/client.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/cdp/protocol.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/cdp/repl.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/cli.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/commands/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/commands/cdp_cmd.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/commands/chat_cmd.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/commands/create_cmd.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/commands/evaluate_cmd.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/commands/init_cmd.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/commands/memory_cmd.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/commands/resume_cmd.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/commands/rollback_cmd.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/commands/run_cmd.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/core/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/core/backend.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/core/config.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/core/display.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/core/git_integration.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/core/llm.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/core/state.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/evaluate/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/evaluate/api_evaluator.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/memory/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/memory/compressor.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/memory/full.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/memory/hot.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/memory/manager.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/memory/warm.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/mode/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/mode/create.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/mode/optimize.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/models/config_models.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/rl/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/rl/baseline_tests.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/rl/checkpoint.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/rl/convergence.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/rl/diagnosis.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/rl/engine.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/rl/environment.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/rl/experience.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/rl/harness_prompts.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/rl/history.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/rl/optimization_logger.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/rl/pre_validation.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/rl/reward.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/rl/strategy_bandit.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/rl/strategy_generator.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/rl/strategy_prompts.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycli/skills/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/agent/agent_manager.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/agent/chat_events.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/agent/mcp/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/agent/mcp/models.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/agent/mcp/tool_loader.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/agent/sandbox/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/agent/sandbox/sandbox_pool.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/agent/sandbox/sandbox_recovery.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/agent/sandbox/session.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/agent/summarization_utils.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/auth/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/auth/ldap_service.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/auth/oa_cache.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/auth/oa_crypto.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/auth/oa_service.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/config/Config.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/config/DatabaseConfig.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/config/ElasticsearchConfig.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/config/EmbeddingConfig.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/config/LLMConfig.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/config/LangfuseConfig.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/config/MQConfig.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/config/PgConfig.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/config/RedisConfig.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/config/RerankerConfig.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/config/SentryConfig.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/config/XxlJobConfig.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/config/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/database/async_base_db_service.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/database/async_database_service.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/database/base_db_service.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/database/database_service.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/database/elasticsearch_service.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/database/pg_checkpoint_service.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/database/redis_service.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/database/token_usage_db_service.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/health/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/health/health_check.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/health/metrics.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/health/ping.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/heartbeat_process/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/heartbeat_process/heartbeat_config.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/heartbeat_process/heartbeat_process_manager.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/heartbeat_process/heartbeat_process_worker.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/llm/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/llm/embedding.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/llm/get_llm.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/llm/llm_logger.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/llm/llm_tokens.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/llm/llm_with_token_tracking.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/llm/native_with_fallback_runnable.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/llm/output_fixing_runnable.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/llm/struct_token.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/llm/sy_langfuse.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/llm/tiktoken_cache/9b5ad71b2ce5302211f9c61530b329a4922fc6a4 +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/llm/tiktoken_cache/fb374d419588a4632f3f557e76b4b70aebbca790 +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/llm/token_usage_es_service.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/llm/token_usage_mysql_service.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/llm/token_utils.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/llm/usage_token.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/logging/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/logging/async_sql_logger.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/logging/kafka_log.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/logging/logger_levels.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/logging/logger_wrapper.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/logging/process_logger.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/logging/sql_logger.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/mcp_server/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/mcp_server/server.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/middleware/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/middleware/context.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/middleware/cors.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/middleware/docs.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/middleware/exception.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/middleware/middleware.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/middleware/monitor_memory.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/middleware/mq.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/middleware/sandbox.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/middleware/timeout.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/middleware/token_tracking.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/middleware/tool_result_truncation.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/middleware/traceid.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/models/base_http.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/models/log.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/models/mcp_server_config.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/models/mqlistener_config.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/models/mqmsg_model.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/models/mqsend_config.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/models/sandbox.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/models/sso_user.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/models/token_usage.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/models/token_usage_mysql.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/models/xxljob_handler_config.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/notice/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/notice/uvicorn_monitor.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/notice/wecom_message.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/rabbitmq/process_pool_consumer.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/rabbitmq/rabbitmq_client.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/rabbitmq/rabbitmq_pool.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/rabbitmq/rabbitmq_service.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/rabbitmq/rabbitmq_service_client_manager.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/rabbitmq/rabbitmq_service_connection_monitor.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/rabbitmq/rabbitmq_service_consumer_manager.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/rabbitmq/rabbitmq_service_core.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/rabbitmq/rabbitmq_service_producer_manager.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/sentry/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/sentry/sy_sentry.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/services.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/sse/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/sse/event.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/sse/sse.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/synacos/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/synacos/example.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/synacos/example2.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/synacos/feign.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/synacos/feign_client.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/synacos/nacos_client_base.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/synacos/nacos_config_manager.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/synacos/nacos_heartbeat_manager.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/synacos/nacos_service.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/synacos/nacos_service_discovery.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/synacos/nacos_service_registration.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/synacos/param.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/tests/deep_agent_server.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/tests/test_consumer_loss_rootcause.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/tests/test_consumer_recovery.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/tests/test_deep_agent.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/tests/test_dynamic_max_tokens.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/tests/test_email.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/tests/test_encoding_cache.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/tests/test_fix_verification.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/tests/test_mcp_server.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/tests/test_minimax_reasoning.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/tests/test_mq.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/tests/test_oa_login.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/tests/test_real_summarization.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/tests/test_summarization_config.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/tests/test_summarization_real.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/tests/test_summary_leak_e2e.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/tools/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/tools/async_utils.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/tools/docs.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/tools/env.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/tools/merge_headers.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/tools/snowflake.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/tools/syemail.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/tools/timing.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/xxljob/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/xxljob/xxljob_service.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon_python_lib.egg-info/SOURCES.txt +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon_python_lib.egg-info/dependency_links.txt +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon_python_lib.egg-info/entry_points.txt +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon_python_lib.egg-info/requires.txt +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon_python_lib.egg-info/top_level.txt +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/tests/test_asyncio_logging.py +0 -0
- {sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/tests/test_sycli.py +0 -0
{sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/agent/deep_agent.py
RENAMED
|
@@ -104,27 +104,35 @@ def _patch_agent_streaming(agent):
|
|
|
104
104
|
from langchain_core.messages import AIMessageChunk as _AIC, AIMessage as _AIM
|
|
105
105
|
from langchain_core.runnables.config import var_child_runnable_config
|
|
106
106
|
|
|
107
|
-
print(
|
|
107
|
+
print(
|
|
108
|
+
f"[StreamingPatch] agent.nodes: {list(agent.nodes.keys())}", flush=True)
|
|
108
109
|
node = agent.nodes.get("model")
|
|
109
110
|
if node is None:
|
|
110
111
|
print("[StreamingPatch] model node not found, skip", flush=True)
|
|
111
|
-
SYLogger.warning(
|
|
112
|
+
SYLogger.warning(
|
|
113
|
+
"[DeepAgent] model node not found, skip streaming patch")
|
|
112
114
|
return
|
|
113
115
|
|
|
114
116
|
inner = node.node # RunnableSeq
|
|
115
|
-
print(
|
|
117
|
+
print(
|
|
118
|
+
f"[StreamingPatch] inner type: {type(inner).__name__}", flush=True)
|
|
116
119
|
if not hasattr(inner, 'steps') or not inner.steps:
|
|
117
120
|
print(f"[StreamingPatch] no steps, inner={inner}", flush=True)
|
|
118
|
-
SYLogger.warning(
|
|
121
|
+
SYLogger.warning(
|
|
122
|
+
"[DeepAgent] model node has no steps, skip streaming patch")
|
|
119
123
|
return
|
|
120
124
|
|
|
121
|
-
|
|
122
|
-
|
|
125
|
+
# RunnableCallable(trace=False, afunc=amodel_node)
|
|
126
|
+
step0 = inner.steps[0]
|
|
127
|
+
print(
|
|
128
|
+
f"[StreamingPatch] step0 type: {type(step0).__name__}, trace={getattr(step0, 'trace', 'N/A')}", flush=True)
|
|
123
129
|
afunc = getattr(step0, "afunc", None) # amodel_node
|
|
124
130
|
if afunc is None or afunc.__closure__ is None:
|
|
125
|
-
SYLogger.warning(
|
|
131
|
+
SYLogger.warning(
|
|
132
|
+
"[DeepAgent] amodel_node afunc/closure 缺失, skip streaming patch")
|
|
126
133
|
return
|
|
127
|
-
print(
|
|
134
|
+
print(
|
|
135
|
+
f"[StreamingPatch] afunc: {afunc.__name__}, freevars={afunc.__code__.co_freevars}", flush=True)
|
|
128
136
|
|
|
129
137
|
# ---- 按自由变量名定位 cell(不依赖固定索引)----
|
|
130
138
|
def _cell_by_name(fn, name):
|
|
@@ -192,7 +200,8 @@ def _patch_agent_streaming(agent):
|
|
|
192
200
|
f"[StreamingPatch] clamp max_tokens: "
|
|
193
201
|
f"context={max_tokens_limit}, max_output={max_output} → {dynamic_max}")
|
|
194
202
|
except Exception as e:
|
|
195
|
-
SYLogger.warning(
|
|
203
|
+
SYLogger.warning(
|
|
204
|
+
f"[StreamingPatch] clamp max_tokens failed: {e}")
|
|
196
205
|
|
|
197
206
|
async def _patched_execute_model_async(request):
|
|
198
207
|
"""替代 factory._execute_model_async: 用 astream + config 实现流式回调。"""
|
|
@@ -219,7 +228,8 @@ def _patch_agent_streaming(agent):
|
|
|
219
228
|
_summary_text = re.sub(
|
|
220
229
|
r'</?internal_context_data>', '', _raw, flags=re.DOTALL
|
|
221
230
|
).strip()
|
|
222
|
-
SYLogger.debug(
|
|
231
|
+
SYLogger.debug(
|
|
232
|
+
"[DeepAgent] 摘要已从 HumanMessage 提取,将注入 system_message")
|
|
223
233
|
else:
|
|
224
234
|
_filtered_messages.append(_msg)
|
|
225
235
|
messages = _filtered_messages
|
|
@@ -233,7 +243,8 @@ def _patch_agent_streaming(agent):
|
|
|
233
243
|
f"{_summary_text}\n"
|
|
234
244
|
"</system_context>"
|
|
235
245
|
)
|
|
236
|
-
_new_sys = append_to_system_message(
|
|
246
|
+
_new_sys = append_to_system_message(
|
|
247
|
+
request.system_message, _summary_directive)
|
|
237
248
|
request = request.override(system_message=_new_sys)
|
|
238
249
|
|
|
239
250
|
if request.system_message:
|
|
@@ -254,7 +265,8 @@ def _patch_agent_streaming(agent):
|
|
|
254
265
|
|
|
255
266
|
if not chunks:
|
|
256
267
|
# astream 无产出时降级到原始 ainvoke(不走流式)
|
|
257
|
-
SYLogger.warning(
|
|
268
|
+
SYLogger.warning(
|
|
269
|
+
"[StreamingPatch] astream returned empty, fallback to ainvoke")
|
|
258
270
|
output = await model_.ainvoke(messages, config=config)
|
|
259
271
|
else:
|
|
260
272
|
generation = chunks[0]
|
|
@@ -268,8 +280,10 @@ def _patch_agent_streaming(agent):
|
|
|
268
280
|
content=ai_message.content,
|
|
269
281
|
additional_kwargs=ai_message.additional_kwargs,
|
|
270
282
|
tool_calls=ai_message.tool_calls,
|
|
271
|
-
usage_metadata=getattr(
|
|
272
|
-
|
|
283
|
+
usage_metadata=getattr(
|
|
284
|
+
ai_message, "usage_metadata", None),
|
|
285
|
+
response_metadata=getattr(
|
|
286
|
+
ai_message, "response_metadata", {}),
|
|
273
287
|
id=ai_message.id,
|
|
274
288
|
)
|
|
275
289
|
output = ai_message
|
|
@@ -277,7 +291,8 @@ def _patch_agent_streaming(agent):
|
|
|
277
291
|
if _name:
|
|
278
292
|
output.name = _name
|
|
279
293
|
|
|
280
|
-
handled_output = _handle_model_output(
|
|
294
|
+
handled_output = _handle_model_output(
|
|
295
|
+
output, effective_response_format)
|
|
281
296
|
return ModelResponse(
|
|
282
297
|
result=handled_output["messages"],
|
|
283
298
|
structured_response=handled_output.get("structured_response"),
|
|
@@ -289,7 +304,6 @@ def _patch_agent_streaming(agent):
|
|
|
289
304
|
f"[DeepAgent] _execute_model_async patched (astream + config) "
|
|
290
305
|
f"| langchain={_cur.get('langchain')} core={_cur.get('langchain_core')}")
|
|
291
306
|
|
|
292
|
-
|
|
293
307
|
except Exception as e:
|
|
294
308
|
SYLogger.warning(f"[DeepAgent] streaming patch failed: {e}")
|
|
295
309
|
|
|
@@ -437,7 +451,8 @@ class DeepAgent:
|
|
|
437
451
|
input_state = {"messages": [HumanMessage(content=message)]}
|
|
438
452
|
if rubric:
|
|
439
453
|
input_state["rubric"] = rubric
|
|
440
|
-
print(
|
|
454
|
+
print(
|
|
455
|
+
f"[DeepAgent] chat() starting stream, message={repr(message[:80])}", flush=True)
|
|
441
456
|
async for chunk in self._astream_with_retry(
|
|
442
457
|
input_state,
|
|
443
458
|
max_retries=3,
|
|
@@ -457,9 +472,12 @@ class DeepAgent:
|
|
|
457
472
|
_meta = chunk[1]
|
|
458
473
|
_msg_type = type(_msg).__name__
|
|
459
474
|
_content = repr(str(getattr(_msg, 'content', ''))[:80])
|
|
460
|
-
_node = _meta.get('langgraph_node', '?') if isinstance(
|
|
461
|
-
|
|
462
|
-
|
|
475
|
+
_node = _meta.get('langgraph_node', '?') if isinstance(
|
|
476
|
+
_meta, dict) else '?'
|
|
477
|
+
_step = _meta.get('langgraph_step', '?') if isinstance(
|
|
478
|
+
_meta, dict) else '?'
|
|
479
|
+
print(
|
|
480
|
+
f"[DeepAgent] 2tuple: ns={_ns} msg={_msg_type} node={_node} step={_step} content={_content}", flush=True)
|
|
463
481
|
elif isinstance(chunk, tuple) and _chunk_len == 3:
|
|
464
482
|
namespace_p, _tag_p, payload_p = chunk
|
|
465
483
|
if isinstance(payload_p, tuple) and len(payload_p) == 2:
|
|
@@ -467,13 +485,18 @@ class DeepAgent:
|
|
|
467
485
|
_meta = payload_p[1]
|
|
468
486
|
_msg_type = type(_msg).__name__
|
|
469
487
|
_content = repr(str(getattr(_msg, 'content', ''))[:80])
|
|
470
|
-
_node = _meta.get('langgraph_node', '?') if isinstance(
|
|
471
|
-
|
|
472
|
-
|
|
488
|
+
_node = _meta.get('langgraph_node', '?') if isinstance(
|
|
489
|
+
_meta, dict) else '?'
|
|
490
|
+
_step = _meta.get('langgraph_step', '?') if isinstance(
|
|
491
|
+
_meta, dict) else '?'
|
|
492
|
+
print(
|
|
493
|
+
f"[DeepAgent] 3tuple: ns={repr(namespace_p)[:30]} msg={_msg_type} node={_node} step={_step} content={_content}", flush=True)
|
|
473
494
|
else:
|
|
474
|
-
print(
|
|
495
|
+
print(
|
|
496
|
+
f"[DeepAgent] 3tuple: payload_type={type(payload_p).__name__}", flush=True)
|
|
475
497
|
else:
|
|
476
|
-
print(
|
|
498
|
+
print(
|
|
499
|
+
f"[DeepAgent] chunk: type={type(chunk).__name__}", flush=True)
|
|
477
500
|
# 检查取消
|
|
478
501
|
if cancel_event and cancel_event.is_set():
|
|
479
502
|
event = ChatEventBuilder.cancelled("任务已取消")
|
|
@@ -506,10 +529,13 @@ class DeepAgent:
|
|
|
506
529
|
|
|
507
530
|
# ===== 🔑 诊断日志:详细记录每个 chunk =====
|
|
508
531
|
_chunk_type = type(chunk).__name__
|
|
509
|
-
_msg_type = getattr(
|
|
532
|
+
_msg_type = getattr(
|
|
533
|
+
msg, '__class__.__name__', '?') if msg else 'None'
|
|
510
534
|
_ns = namespace if namespace else '()'
|
|
511
|
-
_node = metadata.get(
|
|
512
|
-
|
|
535
|
+
_node = metadata.get(
|
|
536
|
+
"langgraph_node", "?") if metadata else "?"
|
|
537
|
+
_step = metadata.get(
|
|
538
|
+
"langgraph_step", "?") if metadata else "?"
|
|
513
539
|
_content_preview = ""
|
|
514
540
|
if isinstance(msg, BaseMessage):
|
|
515
541
|
_c = msg.content or ""
|
|
@@ -531,8 +557,10 @@ class DeepAgent:
|
|
|
531
557
|
if msg_type in ("AIMessage", "AIMessageChunk"):
|
|
532
558
|
usage_meta = getattr(msg, "usage_metadata", None)
|
|
533
559
|
if usage_meta:
|
|
534
|
-
total_input_tokens += usage_meta.get(
|
|
535
|
-
|
|
560
|
+
total_input_tokens += usage_meta.get(
|
|
561
|
+
"input_tokens", 0)
|
|
562
|
+
total_output_tokens += usage_meta.get(
|
|
563
|
+
"output_tokens", 0)
|
|
536
564
|
if usage_meta.get("input_tokens", 0) > 0:
|
|
537
565
|
SYLogger.debug(
|
|
538
566
|
f"[DeepAgent] usage_metadata | input={usage_meta.get('input_tokens', 0)} "
|
|
@@ -611,10 +639,12 @@ class DeepAgent:
|
|
|
611
639
|
await on_event(event)
|
|
612
640
|
yield event
|
|
613
641
|
|
|
614
|
-
print(
|
|
642
|
+
print(
|
|
643
|
+
f"[DeepAgent] post-yield: msg_type={type(msg).__name__}, is_BaseMessage={isinstance(msg, BaseMessage)}", flush=True)
|
|
615
644
|
|
|
616
645
|
if not isinstance(msg, BaseMessage):
|
|
617
|
-
print(
|
|
646
|
+
print(
|
|
647
|
+
f"[DeepAgent] SKIPPING non-BaseMessage: {type(msg).__name__}", flush=True)
|
|
618
648
|
continue
|
|
619
649
|
|
|
620
650
|
msg_type = msg.__class__.__name__
|
|
@@ -623,14 +653,16 @@ class DeepAgent:
|
|
|
623
653
|
# SummarizationMiddleware 会将摘要包装为 HumanMessage(lc_source="summarization"),
|
|
624
654
|
# 这仅用于模型内部理解上下文,不应展示给用户
|
|
625
655
|
if msg_type == "HumanMessage" and getattr(msg, "additional_kwargs", {}).get("lc_source") == "summarization":
|
|
626
|
-
SYLogger.debug(
|
|
656
|
+
SYLogger.debug(
|
|
657
|
+
f"[DeepAgent] 跳过摘要消息 (lc_source=summarization)")
|
|
627
658
|
continue
|
|
628
659
|
|
|
629
660
|
raw_content = msg.content
|
|
630
661
|
# 🔑 处理 content 为 list 的情况(多模态模型)
|
|
631
662
|
if isinstance(raw_content, list):
|
|
632
663
|
content = "".join(
|
|
633
|
-
item.get("text", "") if isinstance(
|
|
664
|
+
item.get("text", "") if isinstance(
|
|
665
|
+
item, dict) else str(item)
|
|
634
666
|
for item in raw_content
|
|
635
667
|
)
|
|
636
668
|
else:
|
|
@@ -639,15 +671,20 @@ class DeepAgent:
|
|
|
639
671
|
# 🔑 Defense 3: 清理 AI 输出中的摘要泄漏标签(安全网)
|
|
640
672
|
# 即使摘要已注入 SystemMessage,模型仍可能在极少数情况下回显标签
|
|
641
673
|
if msg_type in ("AIMessage", "AIMessageChunk") and content:
|
|
674
|
+
_cleaned = False
|
|
642
675
|
for _pat in [
|
|
643
676
|
r'<internal_context_data>.*?</internal_context_data>',
|
|
644
677
|
r'<compressed_history>.*?</compressed_history>',
|
|
645
678
|
r'<system_context>.*?</system_context>',
|
|
646
679
|
]:
|
|
647
680
|
if re.search(_pat, content, re.DOTALL):
|
|
648
|
-
content = re.sub(
|
|
681
|
+
content = re.sub(
|
|
682
|
+
_pat, '', content, flags=re.DOTALL)
|
|
683
|
+
_cleaned = True
|
|
649
684
|
SYLogger.warning("[DeepAgent] AI 输出包含摘要泄漏标签,已清理")
|
|
650
|
-
|
|
685
|
+
# 仅在确实清理了泄漏标签时才 strip,避免吞掉正常的换行符
|
|
686
|
+
if _cleaned:
|
|
687
|
+
content = content.strip()
|
|
651
688
|
|
|
652
689
|
if msg_type in ("AIMessage", "AIMessageChunk"):
|
|
653
690
|
# 🔑 提取 reasoning_content(思考/推理内容)
|
|
@@ -683,11 +720,13 @@ class DeepAgent:
|
|
|
683
720
|
# 用 (id 或 index) 匹配已记录的 tool_call
|
|
684
721
|
if tcc_id:
|
|
685
722
|
existing_tc = next(
|
|
686
|
-
(tc for tc in current_tool_calls if tc.get(
|
|
723
|
+
(tc for tc in current_tool_calls if tc.get(
|
|
724
|
+
"id") == tcc_id), None
|
|
687
725
|
)
|
|
688
726
|
elif tcc_index is not None:
|
|
689
727
|
existing_tc = next(
|
|
690
|
-
(tc for tc in current_tool_calls if tc.get(
|
|
728
|
+
(tc for tc in current_tool_calls if tc.get(
|
|
729
|
+
"_index") == tcc_index), None
|
|
691
730
|
)
|
|
692
731
|
else:
|
|
693
732
|
existing_tc = None
|
|
@@ -764,7 +803,8 @@ class DeepAgent:
|
|
|
764
803
|
# 非空 args 覆盖(完整解析后的结果)
|
|
765
804
|
if tc_args and tc_args != {}:
|
|
766
805
|
existing_tc["args"] = tc_args
|
|
767
|
-
existing_tc["_args_buffer"] = json.dumps(
|
|
806
|
+
existing_tc["_args_buffer"] = json.dumps(
|
|
807
|
+
tc_args, ensure_ascii=False)
|
|
768
808
|
else:
|
|
769
809
|
current_tool_calls.append({
|
|
770
810
|
"id": tc_id, "name": tc_name, "args": tc_args,
|
|
@@ -844,7 +884,8 @@ class DeepAgent:
|
|
|
844
884
|
SYLogger.debug(
|
|
845
885
|
f"[DeepAgent] AI chunk done | {repr(ai_chunk_buffer[:100])}...")
|
|
846
886
|
|
|
847
|
-
print(
|
|
887
|
+
print(
|
|
888
|
+
f"[DeepAgent] FOR LOOP ENDED. stream_step={stream_step}, ai_text_content={repr(ai_text_content[:100])}, tool_calls={len(current_tool_calls)}", flush=True)
|
|
848
889
|
|
|
849
890
|
# 空响应检测:模型被调用但没有产出任何文本
|
|
850
891
|
if not ai_text_content and not ai_chunk_buffer:
|
|
@@ -884,7 +925,8 @@ class DeepAgent:
|
|
|
884
925
|
yield event
|
|
885
926
|
raise
|
|
886
927
|
except Exception as e:
|
|
887
|
-
print(
|
|
928
|
+
print(
|
|
929
|
+
f"[DeepAgent] chat() Exception: {type(e).__name__}: {e}", flush=True)
|
|
888
930
|
import traceback
|
|
889
931
|
traceback.print_exc()
|
|
890
932
|
SYLogger.error(f"[DeepAgent] 聊天异常: {e}")
|
|
@@ -936,66 +978,76 @@ class DeepAgent:
|
|
|
936
978
|
max_sandbox_retries = 3
|
|
937
979
|
|
|
938
980
|
try:
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
break
|
|
976
|
-
raise
|
|
977
|
-
raise
|
|
978
|
-
except ValueError as e:
|
|
979
|
-
err_msg = str(e)
|
|
980
|
-
if "Failed to download" in err_msg or "沙箱服务不可用" in err_msg:
|
|
981
|
-
if self.recovery_manager and sandbox_retries < max_sandbox_retries:
|
|
981
|
+
while True:
|
|
982
|
+
for attempt in range(max_retries):
|
|
983
|
+
try:
|
|
984
|
+
print(
|
|
985
|
+
f"[DeepAgent] _astream_with_retry: attempt={attempt}, starting astream...", flush=True)
|
|
986
|
+
chunk_count = 0
|
|
987
|
+
async for chunk in self.agent.astream(
|
|
988
|
+
input_data,
|
|
989
|
+
config=self.config,
|
|
990
|
+
stream_mode="messages",
|
|
991
|
+
subgraphs=True
|
|
992
|
+
):
|
|
993
|
+
chunk_count += 1
|
|
994
|
+
print(
|
|
995
|
+
f"[DeepAgent] _astream yielding chunk #{chunk_count}", flush=True)
|
|
996
|
+
yield chunk
|
|
997
|
+
print(
|
|
998
|
+
f"[DeepAgent] _astream yield returned, consumer processed chunk #{chunk_count}", flush=True)
|
|
999
|
+
print(
|
|
1000
|
+
f"[DeepAgent] _astream_with_retry: stream ended normally, total_chunks={chunk_count}", flush=True)
|
|
1001
|
+
return
|
|
1002
|
+
except (APIConnectionError, APIError, APITimeoutError, ConnectionError, httpx.RemoteProtocolError) as e:
|
|
1003
|
+
last_error = e
|
|
1004
|
+
print(
|
|
1005
|
+
f"[DeepAgent] _astream_with_retry: API error: {type(e).__name__}: {e}", flush=True)
|
|
1006
|
+
if attempt < max_retries - 1:
|
|
1007
|
+
delay = base_delay * (2 ** attempt)
|
|
1008
|
+
SYLogger.warning(
|
|
1009
|
+
f"[DeepAgent] 连接错误: {e}, {delay}秒后重试...")
|
|
1010
|
+
await asyncio.sleep(delay)
|
|
1011
|
+
else:
|
|
1012
|
+
raise last_error
|
|
1013
|
+
except RuntimeError as e:
|
|
1014
|
+
err_msg = str(e)
|
|
1015
|
+
is_sandbox_error = "沙箱服务不可用" in err_msg or "Failed to download" in err_msg
|
|
1016
|
+
if is_sandbox_error and self.recovery_manager and sandbox_retries < max_sandbox_retries:
|
|
982
1017
|
sandbox_retries += 1
|
|
983
|
-
SYLogger.warning(
|
|
1018
|
+
SYLogger.warning(
|
|
1019
|
+
f"[DeepAgent] 沙箱服务不可用,尝试恢复 ({sandbox_retries}/{max_sandbox_retries})...")
|
|
984
1020
|
recovered = await self.recovery_manager.recover()
|
|
985
1021
|
if recovered:
|
|
986
1022
|
SYLogger.info("[DeepAgent] 沙箱已恢复,继续执行")
|
|
987
1023
|
break
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
1024
|
+
raise
|
|
1025
|
+
raise
|
|
1026
|
+
except ValueError as e:
|
|
1027
|
+
err_msg = str(e)
|
|
1028
|
+
if "Failed to download" in err_msg or "沙箱服务不可用" in err_msg:
|
|
1029
|
+
if self.recovery_manager and sandbox_retries < max_sandbox_retries:
|
|
1030
|
+
sandbox_retries += 1
|
|
1031
|
+
SYLogger.warning(
|
|
1032
|
+
f"[DeepAgent] Memory 下载失败(沙箱不可达),尝试恢复 ({sandbox_retries}/{max_sandbox_retries})...")
|
|
1033
|
+
recovered = await self.recovery_manager.recover()
|
|
1034
|
+
if recovered:
|
|
1035
|
+
SYLogger.info("[DeepAgent] 沙箱已恢复,继续执行")
|
|
1036
|
+
break
|
|
1037
|
+
# 恢复失败也继续执行(降级:memory 不可用不阻塞聊天)
|
|
1038
|
+
SYLogger.warning(
|
|
1039
|
+
f"[DeepAgent] Memory 不可用,降级继续执行: {err_msg}")
|
|
1040
|
+
continue
|
|
1041
|
+
raise
|
|
1042
|
+
else:
|
|
1043
|
+
break
|
|
994
1044
|
except GeneratorExit:
|
|
995
|
-
print(
|
|
1045
|
+
print(
|
|
1046
|
+
"[DeepAgent] _astream_with_retry: GeneratorExit! Consumer closed the generator!", flush=True)
|
|
996
1047
|
raise
|
|
997
1048
|
except Exception as e:
|
|
998
|
-
print(
|
|
1049
|
+
print(
|
|
1050
|
+
f"[DeepAgent] _astream_with_retry: Unexpected exception: {type(e).__name__}: {e}", flush=True)
|
|
999
1051
|
raise
|
|
1000
1052
|
|
|
1001
1053
|
|
|
@@ -1047,7 +1099,8 @@ async def create_deep_agent(
|
|
|
1047
1099
|
# 等方法在原始 ChatOpenAI 上工作,而不是被 LLMWithTokenTracking 的包装拦截。
|
|
1048
1100
|
raw_model = getattr(model, 'llm', model)
|
|
1049
1101
|
if raw_model is not model:
|
|
1050
|
-
print(
|
|
1102
|
+
print(
|
|
1103
|
+
f"[DeepAgent] 提取原始模型: {type(model).__name__} → {type(raw_model).__name__}", flush=True)
|
|
1051
1104
|
if hasattr(raw_model, 'streaming'):
|
|
1052
1105
|
raw_model.streaming = True
|
|
1053
1106
|
|
|
@@ -1136,10 +1189,12 @@ async def create_deep_agent(
|
|
|
1136
1189
|
|
|
1137
1190
|
RunnableCallable.__init__ = _patched_rc_init
|
|
1138
1191
|
except Exception as _patch_err:
|
|
1139
|
-
SYLogger.warning(
|
|
1192
|
+
SYLogger.warning(
|
|
1193
|
+
f"[DeepAgent] RunnableCallable monkey-patch FAILED: {_patch_err}")
|
|
1140
1194
|
|
|
1141
1195
|
agent = _create_deep_agent(**agent_kwargs)
|
|
1142
|
-
print(
|
|
1196
|
+
print(
|
|
1197
|
+
f"[DeepAgent] Agent created, type={type(agent).__name__}", flush=True)
|
|
1143
1198
|
|
|
1144
1199
|
# 恢复原始 __init__
|
|
1145
1200
|
if _original_rc_init is not None:
|
|
@@ -1182,7 +1237,11 @@ async def _sync_skills_to_sandbox(
|
|
|
1182
1237
|
skills_dir: str,
|
|
1183
1238
|
backend: HTTPSandboxBackend,
|
|
1184
1239
|
) -> None:
|
|
1185
|
-
"""同步 skills 到沙箱(按版本检查,版本不一致则覆盖)
|
|
1240
|
+
"""同步 skills SKILL.md 到沙箱(按版本检查,版本不一致则覆盖)
|
|
1241
|
+
|
|
1242
|
+
只同步 SKILL.md 文件,不同步 scripts/ 等大目录。
|
|
1243
|
+
scripts/ 在 agent 实际调用时由 HTTPSandboxBackend._lazy_sync_skill_from_path 按需同步。
|
|
1244
|
+
"""
|
|
1186
1245
|
if not os.path.isdir(skills_dir):
|
|
1187
1246
|
return
|
|
1188
1247
|
|
|
@@ -1222,19 +1281,29 @@ async def _sync_skills_to_sandbox(
|
|
|
1222
1281
|
pass
|
|
1223
1282
|
|
|
1224
1283
|
if remote_version and remote_version == local_version:
|
|
1225
|
-
SYLogger.debug(
|
|
1284
|
+
SYLogger.debug(
|
|
1285
|
+
f"[DeepAgent] 技能版本一致,跳过: {skill_name} v{local_version}")
|
|
1226
1286
|
continue
|
|
1227
1287
|
|
|
1228
1288
|
# 版本不一致或沙箱无版本,删除后重新上传
|
|
1229
1289
|
try:
|
|
1230
1290
|
await backend.aexecute(f"rm -rf /skills/{skill_name}")
|
|
1231
|
-
SYLogger.info(
|
|
1291
|
+
SYLogger.info(
|
|
1292
|
+
f"[DeepAgent] 技能版本不一致,覆盖: {skill_name} ({remote_version or '无版本'} → {local_version})")
|
|
1232
1293
|
except Exception as e:
|
|
1233
|
-
SYLogger.warning(
|
|
1294
|
+
SYLogger.warning(
|
|
1295
|
+
f"[DeepAgent] 删除旧版技能失败: {skill_name}, {e}")
|
|
1234
1296
|
continue
|
|
1235
1297
|
|
|
1236
|
-
|
|
1237
|
-
|
|
1298
|
+
# 只同步 SKILL.md(不再同步整个目录)
|
|
1299
|
+
if os.path.isfile(local_skill_md):
|
|
1300
|
+
with open(local_skill_md, "rb") as f:
|
|
1301
|
+
content = f.read()
|
|
1302
|
+
await backend.aupload_files([
|
|
1303
|
+
(f"/skills/{skill_name}/SKILL.md", content)
|
|
1304
|
+
])
|
|
1305
|
+
SYLogger.info(
|
|
1306
|
+
f"[DeepAgent] 同步技能元数据到沙箱: {skill_name} v{local_version} (仅 SKILL.md)")
|
|
1238
1307
|
except Exception as e:
|
|
1239
1308
|
SYLogger.warning(f"[DeepAgent] 技能同步失败: {e}")
|
|
1240
1309
|
|
|
@@ -1244,16 +1313,14 @@ async def _create_sandbox_backend(
|
|
|
1244
1313
|
config: AgentConfig,
|
|
1245
1314
|
project_root: Path,
|
|
1246
1315
|
) -> HTTPSandboxBackend:
|
|
1247
|
-
"""创建并同步沙箱后端
|
|
1248
|
-
sync_dirs = []
|
|
1316
|
+
"""创建并同步沙箱后端
|
|
1249
1317
|
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
skills_dir.mkdir(parents=True, exist_ok=True)
|
|
1255
|
-
sync_dirs.append((str(skills_dir), "/skills"))
|
|
1318
|
+
注意:skills 目录不再通过 sync_dirs 全量同步,
|
|
1319
|
+
而是由 _sync_skills_to_sandbox() 做版本感知的增量同步。
|
|
1320
|
+
"""
|
|
1321
|
+
sync_dirs = []
|
|
1256
1322
|
|
|
1323
|
+
# skills 不再通过 sync_dirs 全量同步,改由 _sync_skills_to_sandbox() 按版本增量同步
|
|
1257
1324
|
if config.memory_dir:
|
|
1258
1325
|
memory_dir = Path(config.memory_dir)
|
|
1259
1326
|
else:
|
|
@@ -1261,12 +1328,19 @@ async def _create_sandbox_backend(
|
|
|
1261
1328
|
memory_dir.mkdir(parents=True, exist_ok=True)
|
|
1262
1329
|
sync_dirs.append((str(memory_dir), "/memory"))
|
|
1263
1330
|
|
|
1331
|
+
# 确定 skills_dir,传递给沙箱后端用于懒同步
|
|
1332
|
+
if config.skills_dir:
|
|
1333
|
+
skills_dir_for_backend = str(Path(config.skills_dir))
|
|
1334
|
+
else:
|
|
1335
|
+
skills_dir_for_backend = str(project_root / "skills")
|
|
1336
|
+
|
|
1264
1337
|
sandbox_backend = HTTPSandboxBackend.from_nacos(
|
|
1265
1338
|
service_name=config.sandbox_service_name,
|
|
1266
1339
|
user_id=user_id,
|
|
1267
1340
|
timeout=config.sandbox_timeout,
|
|
1268
1341
|
sync_dirs=sync_dirs,
|
|
1269
1342
|
auto_sync=True,
|
|
1343
|
+
skills_dir=skills_dir_for_backend,
|
|
1270
1344
|
)
|
|
1271
1345
|
|
|
1272
1346
|
try:
|
{sycommon_python_lib-0.2.5a36 → sycommon_python_lib-0.2.5a38}/src/sycommon/agent/multi_agent_team.py
RENAMED
|
@@ -655,16 +655,14 @@ async def _create_sandbox_backend_for_team(
|
|
|
655
655
|
config: TeamConfig,
|
|
656
656
|
project_root: Path,
|
|
657
657
|
) -> HTTPSandboxBackend:
|
|
658
|
-
"""创建并同步沙箱后端(团队版本)
|
|
659
|
-
sync_dirs = []
|
|
658
|
+
"""创建并同步沙箱后端(团队版本)
|
|
660
659
|
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
skills_dir.mkdir(parents=True, exist_ok=True)
|
|
666
|
-
sync_dirs.append((str(skills_dir), "/skills"))
|
|
660
|
+
注意:skills 目录不再通过 sync_dirs 全量同步,
|
|
661
|
+
而是由 _sync_skills_to_sandbox() 做版本感知的增量同步。
|
|
662
|
+
"""
|
|
663
|
+
sync_dirs = []
|
|
667
664
|
|
|
665
|
+
# skills 不再通过 sync_dirs 全量同步,改由 _sync_skills_to_sandbox() 按版本增量同步
|
|
668
666
|
if config.memory_dir:
|
|
669
667
|
memory_dir = Path(config.memory_dir)
|
|
670
668
|
else:
|
|
@@ -672,6 +670,12 @@ async def _create_sandbox_backend_for_team(
|
|
|
672
670
|
memory_dir.mkdir(parents=True, exist_ok=True)
|
|
673
671
|
sync_dirs.append((str(memory_dir), "/memory"))
|
|
674
672
|
|
|
673
|
+
# 确定 skills_dir,传递给沙箱后端用于懒同步
|
|
674
|
+
if config.skills_dir:
|
|
675
|
+
skills_dir_for_backend = str(Path(config.skills_dir))
|
|
676
|
+
else:
|
|
677
|
+
skills_dir_for_backend = str(project_root / "skills")
|
|
678
|
+
|
|
675
679
|
sandbox_backend = HTTPSandboxBackend.from_nacos(
|
|
676
680
|
service_name=config.sandbox_service_name,
|
|
677
681
|
user_id=user_id,
|
|
@@ -679,6 +683,7 @@ async def _create_sandbox_backend_for_team(
|
|
|
679
683
|
sync_dirs=sync_dirs,
|
|
680
684
|
auto_sync=True,
|
|
681
685
|
version=get_env_var('VERSION') or None,
|
|
686
|
+
skills_dir=skills_dir_for_backend,
|
|
682
687
|
)
|
|
683
688
|
|
|
684
689
|
# 健康检查
|