sycommon-python-lib 0.2.5a35__tar.gz → 0.2.5a37__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.5a35 → sycommon_python_lib-0.2.5a37}/PKG-INFO +1 -1
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/pyproject.toml +1 -1
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/agent/deep_agent.py +194 -107
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/agent/summarization_utils.py +4 -3
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/middleware/traceid.py +0 -3
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/rabbitmq/rabbitmq_client.py +14 -94
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/rabbitmq/rabbitmq_service_client_manager.py +3 -24
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/rabbitmq/rabbitmq_service_connection_monitor.py +35 -14
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/rabbitmq/rabbitmq_service_consumer_manager.py +2 -20
- sycommon_python_lib-0.2.5a37/src/sycommon/tests/test_consumer_loss_rootcause.py +399 -0
- sycommon_python_lib-0.2.5a37/src/sycommon/tests/test_fix_verification.py +404 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon_python_lib.egg-info/PKG-INFO +1 -1
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon_python_lib.egg-info/SOURCES.txt +2 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/README.md +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/setup.cfg +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/cli.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/core/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/core/console.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/core/models.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/core/project.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/core/utils.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/agent/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/agent/agent/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/agent/agent/main_agent.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/agent/agent/nodes/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/agent/agent/nodes/example_node.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/agent/agent/states/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/agent/agent/states/agent_state.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/agent/api/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/agent/api/query.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/agent/api/sse/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/agent/api/sse/agent.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/agent/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/agent/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/agent/db/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/agent/db/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/agent/db/model/entity.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/agent/db/service.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/agent/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/agent/model/parse.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/agent/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/agent/tools/mq.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/base/.env.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/base/.gitignore.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/base/Dockerfile.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/base/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/base/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/base/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/base/app.yaml.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/base/client/FileServiceClient.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/base/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/base/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/base/model/file_info.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/base/requirements.txt.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/cli/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/cli/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/cli/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/cli/commands/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/cli/commands/hello.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/cli/pyproject.toml.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/cli/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/web/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/web/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/web/api/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/web/api/echo.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/web/api/sse/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/web/api/sse/echo.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/web/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/web/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/web/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/web/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/command/templates/web/tools/mq.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/nexus/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/__main__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/agents/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/agents/factory.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/agents/prompts.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/cdp/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/cdp/browser.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/cdp/capabilities/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/cdp/capabilities/console.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/cdp/capabilities/dom.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/cdp/capabilities/network.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/cdp/capabilities/page_errors.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/cdp/capabilities/performance.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/cdp/capabilities/screenshot.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/cdp/client.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/cdp/protocol.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/cdp/repl.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/cli.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/commands/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/commands/cdp_cmd.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/commands/chat_cmd.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/commands/create_cmd.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/commands/evaluate_cmd.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/commands/init_cmd.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/commands/memory_cmd.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/commands/resume_cmd.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/commands/rollback_cmd.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/commands/run_cmd.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/core/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/core/backend.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/core/config.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/core/display.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/core/git_integration.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/core/llm.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/core/state.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/evaluate/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/evaluate/api_evaluator.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/memory/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/memory/compressor.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/memory/full.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/memory/hot.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/memory/manager.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/memory/warm.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/mode/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/mode/create.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/mode/optimize.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/models/config_models.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/rl/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/rl/baseline_tests.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/rl/checkpoint.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/rl/convergence.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/rl/diagnosis.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/rl/engine.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/rl/environment.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/rl/experience.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/rl/harness_prompts.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/rl/history.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/rl/optimization_logger.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/rl/pre_validation.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/rl/reward.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/rl/strategy_bandit.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/rl/strategy_generator.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/rl/strategy_prompts.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycli/skills/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/agent/agent_manager.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/agent/chat_events.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/agent/mcp/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/agent/mcp/models.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/agent/mcp/tool_loader.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/agent/multi_agent_team.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/agent/sandbox/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/agent/sandbox/file_ops.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/agent/sandbox/http_sandbox_backend.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/agent/sandbox/minio_sync.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/agent/sandbox/sandbox_pool.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/agent/sandbox/sandbox_recovery.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/agent/sandbox/session.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/auth/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/auth/ldap_service.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/auth/oa_cache.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/auth/oa_crypto.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/auth/oa_service.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/auth/wecom_ldap_service.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/config/Config.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/config/DatabaseConfig.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/config/ElasticsearchConfig.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/config/EmbeddingConfig.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/config/LLMConfig.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/config/LangfuseConfig.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/config/MQConfig.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/config/PgConfig.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/config/RedisConfig.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/config/RerankerConfig.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/config/SentryConfig.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/config/XxlJobConfig.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/config/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/database/async_base_db_service.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/database/async_database_service.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/database/base_db_service.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/database/database_service.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/database/elasticsearch_service.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/database/pg_checkpoint_service.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/database/redis_service.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/database/token_usage_db_service.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/health/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/health/health_check.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/health/metrics.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/health/ping.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/heartbeat_process/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/heartbeat_process/heartbeat_config.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/heartbeat_process/heartbeat_process_manager.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/heartbeat_process/heartbeat_process_worker.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/llm/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/llm/embedding.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/llm/get_llm.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/llm/llm_logger.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/llm/llm_tokens.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/llm/llm_with_token_tracking.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/llm/native_with_fallback_runnable.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/llm/output_fixing_runnable.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/llm/struct_token.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/llm/sy_langfuse.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/llm/tiktoken_cache/9b5ad71b2ce5302211f9c61530b329a4922fc6a4 +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/llm/tiktoken_cache/fb374d419588a4632f3f557e76b4b70aebbca790 +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/llm/token_usage_es_service.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/llm/token_usage_mysql_service.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/llm/token_utils.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/llm/usage_token.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/logging/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/logging/async_sql_logger.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/logging/kafka_log.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/logging/logger_levels.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/logging/logger_wrapper.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/logging/process_logger.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/logging/sql_logger.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/mcp_server/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/mcp_server/server.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/middleware/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/middleware/context.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/middleware/cors.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/middleware/docs.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/middleware/exception.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/middleware/middleware.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/middleware/monitor_memory.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/middleware/mq.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/middleware/sandbox.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/middleware/timeout.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/middleware/token_tracking.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/middleware/tool_result_truncation.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/models/base_http.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/models/log.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/models/mcp_server_config.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/models/mqlistener_config.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/models/mqmsg_model.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/models/mqsend_config.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/models/sandbox.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/models/sso_user.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/models/token_usage.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/models/token_usage_mysql.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/models/xxljob_handler_config.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/notice/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/notice/uvicorn_monitor.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/notice/wecom_message.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/rabbitmq/process_pool_consumer.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/rabbitmq/rabbitmq_pool.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/rabbitmq/rabbitmq_service.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/rabbitmq/rabbitmq_service_core.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/rabbitmq/rabbitmq_service_producer_manager.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/sentry/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/sentry/sy_sentry.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/services.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/sse/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/sse/event.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/sse/sse.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/synacos/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/synacos/example.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/synacos/example2.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/synacos/feign.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/synacos/feign_client.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/synacos/nacos_client_base.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/synacos/nacos_config_manager.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/synacos/nacos_heartbeat_manager.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/synacos/nacos_service.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/synacos/nacos_service_discovery.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/synacos/nacos_service_registration.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/synacos/param.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/tests/deep_agent_server.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/tests/test_consumer_recovery.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/tests/test_deep_agent.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/tests/test_dynamic_max_tokens.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/tests/test_email.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/tests/test_encoding_cache.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/tests/test_mcp_server.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/tests/test_minimax_reasoning.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/tests/test_mq.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/tests/test_oa_login.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/tests/test_real_summarization.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/tests/test_summarization_config.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/tests/test_summarization_real.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/tests/test_summary_leak_e2e.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/tools/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/tools/async_utils.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/tools/docs.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/tools/env.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/tools/merge_headers.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/tools/snowflake.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/tools/syemail.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/tools/timing.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/xxljob/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/xxljob/xxljob_service.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon_python_lib.egg-info/dependency_links.txt +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon_python_lib.egg-info/entry_points.txt +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon_python_lib.egg-info/requires.txt +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon_python_lib.egg-info/top_level.txt +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/tests/test_asyncio_logging.py +0 -0
- {sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/tests/test_sycli.py +0 -0
{sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/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 实现流式回调。"""
|
|
@@ -201,26 +210,43 @@ def _patch_agent_streaming(agent):
|
|
|
201
210
|
model_, effective_response_format = _get_bound_model(request)
|
|
202
211
|
messages = request.messages
|
|
203
212
|
|
|
204
|
-
# 🔑 根治摘要泄漏:将 lc_source="summarization" 的 HumanMessage
|
|
213
|
+
# 🔑 根治摘要泄漏:将 lc_source="summarization" 的 HumanMessage 内容
|
|
214
|
+
# 注入到 system_message 而非直接丢弃,保持记忆连续性。
|
|
205
215
|
# 根因分析(2026-06-06 端到端测试确认):
|
|
206
|
-
# 1. SummarizationMiddleware
|
|
207
|
-
# 2.
|
|
208
|
-
#
|
|
209
|
-
#
|
|
210
|
-
#
|
|
211
|
-
|
|
212
|
-
# 能捕获 HumanMessage,但模型自己输出的 AIMessageChunk 无法过滤)
|
|
213
|
-
# 修复策略:从模型输入中完全移除摘要 HumanMessage,不注入任何形式的摘要内容
|
|
214
|
-
# 摘要仍保留在 LangGraph _summarization_event 状态中,供后续压缩轮次使用
|
|
216
|
+
# 1. SummarizationMiddleware 将摘要注入为 HumanMessage
|
|
217
|
+
# 2. 模型看到 HumanMessage 后容易将其作为对话内容回显/复述
|
|
218
|
+
# 3. 之前完全移除摘要导致压缩后模型丢失所有记忆
|
|
219
|
+
# 修复策略:提取摘要内容 → 注入 SystemMessage(模型视其为指令/背景知识,
|
|
220
|
+
# 回显概率远低于 HumanMessage)→ 从 messages 中移除原始 HumanMessage
|
|
221
|
+
_summary_text = None
|
|
215
222
|
_filtered_messages = []
|
|
216
223
|
for _msg in messages:
|
|
217
224
|
if (isinstance(_msg, HumanMessage)
|
|
218
225
|
and getattr(_msg, "additional_kwargs", {}).get("lc_source") == "summarization"):
|
|
219
|
-
|
|
226
|
+
_raw = _msg.content or ""
|
|
227
|
+
# 去掉 <internal_context_data> 包装标签,提取纯摘要
|
|
228
|
+
_summary_text = re.sub(
|
|
229
|
+
r'</?internal_context_data>', '', _raw, flags=re.DOTALL
|
|
230
|
+
).strip()
|
|
231
|
+
SYLogger.debug(
|
|
232
|
+
"[DeepAgent] 摘要已从 HumanMessage 提取,将注入 system_message")
|
|
220
233
|
else:
|
|
221
234
|
_filtered_messages.append(_msg)
|
|
222
235
|
messages = _filtered_messages
|
|
223
236
|
|
|
237
|
+
if _summary_text and request.system_message:
|
|
238
|
+
from deepagents.middleware._utils import append_to_system_message
|
|
239
|
+
_summary_directive = (
|
|
240
|
+
"\n\n<system_context>\n"
|
|
241
|
+
"以下是之前对话历史的压缩摘要,作为你的内部记忆使用。"
|
|
242
|
+
"把它当作你自己的回忆,绝对不要在回复中重复、复述或引用此内容的任何部分。\n"
|
|
243
|
+
f"{_summary_text}\n"
|
|
244
|
+
"</system_context>"
|
|
245
|
+
)
|
|
246
|
+
_new_sys = append_to_system_message(
|
|
247
|
+
request.system_message, _summary_directive)
|
|
248
|
+
request = request.override(system_message=_new_sys)
|
|
249
|
+
|
|
224
250
|
if request.system_message:
|
|
225
251
|
messages = [request.system_message, *messages]
|
|
226
252
|
|
|
@@ -239,7 +265,8 @@ def _patch_agent_streaming(agent):
|
|
|
239
265
|
|
|
240
266
|
if not chunks:
|
|
241
267
|
# astream 无产出时降级到原始 ainvoke(不走流式)
|
|
242
|
-
SYLogger.warning(
|
|
268
|
+
SYLogger.warning(
|
|
269
|
+
"[StreamingPatch] astream returned empty, fallback to ainvoke")
|
|
243
270
|
output = await model_.ainvoke(messages, config=config)
|
|
244
271
|
else:
|
|
245
272
|
generation = chunks[0]
|
|
@@ -253,8 +280,10 @@ def _patch_agent_streaming(agent):
|
|
|
253
280
|
content=ai_message.content,
|
|
254
281
|
additional_kwargs=ai_message.additional_kwargs,
|
|
255
282
|
tool_calls=ai_message.tool_calls,
|
|
256
|
-
usage_metadata=getattr(
|
|
257
|
-
|
|
283
|
+
usage_metadata=getattr(
|
|
284
|
+
ai_message, "usage_metadata", None),
|
|
285
|
+
response_metadata=getattr(
|
|
286
|
+
ai_message, "response_metadata", {}),
|
|
258
287
|
id=ai_message.id,
|
|
259
288
|
)
|
|
260
289
|
output = ai_message
|
|
@@ -262,7 +291,8 @@ def _patch_agent_streaming(agent):
|
|
|
262
291
|
if _name:
|
|
263
292
|
output.name = _name
|
|
264
293
|
|
|
265
|
-
handled_output = _handle_model_output(
|
|
294
|
+
handled_output = _handle_model_output(
|
|
295
|
+
output, effective_response_format)
|
|
266
296
|
return ModelResponse(
|
|
267
297
|
result=handled_output["messages"],
|
|
268
298
|
structured_response=handled_output.get("structured_response"),
|
|
@@ -274,7 +304,6 @@ def _patch_agent_streaming(agent):
|
|
|
274
304
|
f"[DeepAgent] _execute_model_async patched (astream + config) "
|
|
275
305
|
f"| langchain={_cur.get('langchain')} core={_cur.get('langchain_core')}")
|
|
276
306
|
|
|
277
|
-
|
|
278
307
|
except Exception as e:
|
|
279
308
|
SYLogger.warning(f"[DeepAgent] streaming patch failed: {e}")
|
|
280
309
|
|
|
@@ -422,7 +451,8 @@ class DeepAgent:
|
|
|
422
451
|
input_state = {"messages": [HumanMessage(content=message)]}
|
|
423
452
|
if rubric:
|
|
424
453
|
input_state["rubric"] = rubric
|
|
425
|
-
print(
|
|
454
|
+
print(
|
|
455
|
+
f"[DeepAgent] chat() starting stream, message={repr(message[:80])}", flush=True)
|
|
426
456
|
async for chunk in self._astream_with_retry(
|
|
427
457
|
input_state,
|
|
428
458
|
max_retries=3,
|
|
@@ -442,9 +472,12 @@ class DeepAgent:
|
|
|
442
472
|
_meta = chunk[1]
|
|
443
473
|
_msg_type = type(_msg).__name__
|
|
444
474
|
_content = repr(str(getattr(_msg, 'content', ''))[:80])
|
|
445
|
-
_node = _meta.get('langgraph_node', '?') if isinstance(
|
|
446
|
-
|
|
447
|
-
|
|
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)
|
|
448
481
|
elif isinstance(chunk, tuple) and _chunk_len == 3:
|
|
449
482
|
namespace_p, _tag_p, payload_p = chunk
|
|
450
483
|
if isinstance(payload_p, tuple) and len(payload_p) == 2:
|
|
@@ -452,13 +485,18 @@ class DeepAgent:
|
|
|
452
485
|
_meta = payload_p[1]
|
|
453
486
|
_msg_type = type(_msg).__name__
|
|
454
487
|
_content = repr(str(getattr(_msg, 'content', ''))[:80])
|
|
455
|
-
_node = _meta.get('langgraph_node', '?') if isinstance(
|
|
456
|
-
|
|
457
|
-
|
|
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)
|
|
458
494
|
else:
|
|
459
|
-
print(
|
|
495
|
+
print(
|
|
496
|
+
f"[DeepAgent] 3tuple: payload_type={type(payload_p).__name__}", flush=True)
|
|
460
497
|
else:
|
|
461
|
-
print(
|
|
498
|
+
print(
|
|
499
|
+
f"[DeepAgent] chunk: type={type(chunk).__name__}", flush=True)
|
|
462
500
|
# 检查取消
|
|
463
501
|
if cancel_event and cancel_event.is_set():
|
|
464
502
|
event = ChatEventBuilder.cancelled("任务已取消")
|
|
@@ -491,10 +529,13 @@ class DeepAgent:
|
|
|
491
529
|
|
|
492
530
|
# ===== 🔑 诊断日志:详细记录每个 chunk =====
|
|
493
531
|
_chunk_type = type(chunk).__name__
|
|
494
|
-
_msg_type = getattr(
|
|
532
|
+
_msg_type = getattr(
|
|
533
|
+
msg, '__class__.__name__', '?') if msg else 'None'
|
|
495
534
|
_ns = namespace if namespace else '()'
|
|
496
|
-
_node = metadata.get(
|
|
497
|
-
|
|
535
|
+
_node = metadata.get(
|
|
536
|
+
"langgraph_node", "?") if metadata else "?"
|
|
537
|
+
_step = metadata.get(
|
|
538
|
+
"langgraph_step", "?") if metadata else "?"
|
|
498
539
|
_content_preview = ""
|
|
499
540
|
if isinstance(msg, BaseMessage):
|
|
500
541
|
_c = msg.content or ""
|
|
@@ -516,8 +557,10 @@ class DeepAgent:
|
|
|
516
557
|
if msg_type in ("AIMessage", "AIMessageChunk"):
|
|
517
558
|
usage_meta = getattr(msg, "usage_metadata", None)
|
|
518
559
|
if usage_meta:
|
|
519
|
-
total_input_tokens += usage_meta.get(
|
|
520
|
-
|
|
560
|
+
total_input_tokens += usage_meta.get(
|
|
561
|
+
"input_tokens", 0)
|
|
562
|
+
total_output_tokens += usage_meta.get(
|
|
563
|
+
"output_tokens", 0)
|
|
521
564
|
if usage_meta.get("input_tokens", 0) > 0:
|
|
522
565
|
SYLogger.debug(
|
|
523
566
|
f"[DeepAgent] usage_metadata | input={usage_meta.get('input_tokens', 0)} "
|
|
@@ -596,10 +639,12 @@ class DeepAgent:
|
|
|
596
639
|
await on_event(event)
|
|
597
640
|
yield event
|
|
598
641
|
|
|
599
|
-
print(
|
|
642
|
+
print(
|
|
643
|
+
f"[DeepAgent] post-yield: msg_type={type(msg).__name__}, is_BaseMessage={isinstance(msg, BaseMessage)}", flush=True)
|
|
600
644
|
|
|
601
645
|
if not isinstance(msg, BaseMessage):
|
|
602
|
-
print(
|
|
646
|
+
print(
|
|
647
|
+
f"[DeepAgent] SKIPPING non-BaseMessage: {type(msg).__name__}", flush=True)
|
|
603
648
|
continue
|
|
604
649
|
|
|
605
650
|
msg_type = msg.__class__.__name__
|
|
@@ -608,19 +653,39 @@ class DeepAgent:
|
|
|
608
653
|
# SummarizationMiddleware 会将摘要包装为 HumanMessage(lc_source="summarization"),
|
|
609
654
|
# 这仅用于模型内部理解上下文,不应展示给用户
|
|
610
655
|
if msg_type == "HumanMessage" and getattr(msg, "additional_kwargs", {}).get("lc_source") == "summarization":
|
|
611
|
-
SYLogger.debug(
|
|
656
|
+
SYLogger.debug(
|
|
657
|
+
f"[DeepAgent] 跳过摘要消息 (lc_source=summarization)")
|
|
612
658
|
continue
|
|
613
659
|
|
|
614
660
|
raw_content = msg.content
|
|
615
661
|
# 🔑 处理 content 为 list 的情况(多模态模型)
|
|
616
662
|
if isinstance(raw_content, list):
|
|
617
663
|
content = "".join(
|
|
618
|
-
item.get("text", "") if isinstance(
|
|
664
|
+
item.get("text", "") if isinstance(
|
|
665
|
+
item, dict) else str(item)
|
|
619
666
|
for item in raw_content
|
|
620
667
|
)
|
|
621
668
|
else:
|
|
622
669
|
content = raw_content or ""
|
|
623
670
|
|
|
671
|
+
# 🔑 Defense 3: 清理 AI 输出中的摘要泄漏标签(安全网)
|
|
672
|
+
# 即使摘要已注入 SystemMessage,模型仍可能在极少数情况下回显标签
|
|
673
|
+
if msg_type in ("AIMessage", "AIMessageChunk") and content:
|
|
674
|
+
_cleaned = False
|
|
675
|
+
for _pat in [
|
|
676
|
+
r'<internal_context_data>.*?</internal_context_data>',
|
|
677
|
+
r'<compressed_history>.*?</compressed_history>',
|
|
678
|
+
r'<system_context>.*?</system_context>',
|
|
679
|
+
]:
|
|
680
|
+
if re.search(_pat, content, re.DOTALL):
|
|
681
|
+
content = re.sub(
|
|
682
|
+
_pat, '', content, flags=re.DOTALL)
|
|
683
|
+
_cleaned = True
|
|
684
|
+
SYLogger.warning("[DeepAgent] AI 输出包含摘要泄漏标签,已清理")
|
|
685
|
+
# 仅在确实清理了泄漏标签时才 strip,避免吞掉正常的换行符
|
|
686
|
+
if _cleaned:
|
|
687
|
+
content = content.strip()
|
|
688
|
+
|
|
624
689
|
if msg_type in ("AIMessage", "AIMessageChunk"):
|
|
625
690
|
# 🔑 提取 reasoning_content(思考/推理内容)
|
|
626
691
|
# 模型在 thinking 模式下会将推理过程放在 reasoning_content 字段,
|
|
@@ -655,11 +720,13 @@ class DeepAgent:
|
|
|
655
720
|
# 用 (id 或 index) 匹配已记录的 tool_call
|
|
656
721
|
if tcc_id:
|
|
657
722
|
existing_tc = next(
|
|
658
|
-
(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
|
|
659
725
|
)
|
|
660
726
|
elif tcc_index is not None:
|
|
661
727
|
existing_tc = next(
|
|
662
|
-
(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
|
|
663
730
|
)
|
|
664
731
|
else:
|
|
665
732
|
existing_tc = None
|
|
@@ -736,7 +803,8 @@ class DeepAgent:
|
|
|
736
803
|
# 非空 args 覆盖(完整解析后的结果)
|
|
737
804
|
if tc_args and tc_args != {}:
|
|
738
805
|
existing_tc["args"] = tc_args
|
|
739
|
-
existing_tc["_args_buffer"] = json.dumps(
|
|
806
|
+
existing_tc["_args_buffer"] = json.dumps(
|
|
807
|
+
tc_args, ensure_ascii=False)
|
|
740
808
|
else:
|
|
741
809
|
current_tool_calls.append({
|
|
742
810
|
"id": tc_id, "name": tc_name, "args": tc_args,
|
|
@@ -816,7 +884,8 @@ class DeepAgent:
|
|
|
816
884
|
SYLogger.debug(
|
|
817
885
|
f"[DeepAgent] AI chunk done | {repr(ai_chunk_buffer[:100])}...")
|
|
818
886
|
|
|
819
|
-
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)
|
|
820
889
|
|
|
821
890
|
# 空响应检测:模型被调用但没有产出任何文本
|
|
822
891
|
if not ai_text_content and not ai_chunk_buffer:
|
|
@@ -856,7 +925,8 @@ class DeepAgent:
|
|
|
856
925
|
yield event
|
|
857
926
|
raise
|
|
858
927
|
except Exception as e:
|
|
859
|
-
print(
|
|
928
|
+
print(
|
|
929
|
+
f"[DeepAgent] chat() Exception: {type(e).__name__}: {e}", flush=True)
|
|
860
930
|
import traceback
|
|
861
931
|
traceback.print_exc()
|
|
862
932
|
SYLogger.error(f"[DeepAgent] 聊天异常: {e}")
|
|
@@ -908,66 +978,76 @@ class DeepAgent:
|
|
|
908
978
|
max_sandbox_retries = 3
|
|
909
979
|
|
|
910
980
|
try:
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
break
|
|
948
|
-
raise
|
|
949
|
-
raise
|
|
950
|
-
except ValueError as e:
|
|
951
|
-
err_msg = str(e)
|
|
952
|
-
if "Failed to download" in err_msg or "沙箱服务不可用" in err_msg:
|
|
953
|
-
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:
|
|
954
1017
|
sandbox_retries += 1
|
|
955
|
-
SYLogger.warning(
|
|
1018
|
+
SYLogger.warning(
|
|
1019
|
+
f"[DeepAgent] 沙箱服务不可用,尝试恢复 ({sandbox_retries}/{max_sandbox_retries})...")
|
|
956
1020
|
recovered = await self.recovery_manager.recover()
|
|
957
1021
|
if recovered:
|
|
958
1022
|
SYLogger.info("[DeepAgent] 沙箱已恢复,继续执行")
|
|
959
1023
|
break
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
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
|
|
966
1044
|
except GeneratorExit:
|
|
967
|
-
print(
|
|
1045
|
+
print(
|
|
1046
|
+
"[DeepAgent] _astream_with_retry: GeneratorExit! Consumer closed the generator!", flush=True)
|
|
968
1047
|
raise
|
|
969
1048
|
except Exception as e:
|
|
970
|
-
print(
|
|
1049
|
+
print(
|
|
1050
|
+
f"[DeepAgent] _astream_with_retry: Unexpected exception: {type(e).__name__}: {e}", flush=True)
|
|
971
1051
|
raise
|
|
972
1052
|
|
|
973
1053
|
|
|
@@ -1019,7 +1099,8 @@ async def create_deep_agent(
|
|
|
1019
1099
|
# 等方法在原始 ChatOpenAI 上工作,而不是被 LLMWithTokenTracking 的包装拦截。
|
|
1020
1100
|
raw_model = getattr(model, 'llm', model)
|
|
1021
1101
|
if raw_model is not model:
|
|
1022
|
-
print(
|
|
1102
|
+
print(
|
|
1103
|
+
f"[DeepAgent] 提取原始模型: {type(model).__name__} → {type(raw_model).__name__}", flush=True)
|
|
1023
1104
|
if hasattr(raw_model, 'streaming'):
|
|
1024
1105
|
raw_model.streaming = True
|
|
1025
1106
|
|
|
@@ -1108,10 +1189,12 @@ async def create_deep_agent(
|
|
|
1108
1189
|
|
|
1109
1190
|
RunnableCallable.__init__ = _patched_rc_init
|
|
1110
1191
|
except Exception as _patch_err:
|
|
1111
|
-
SYLogger.warning(
|
|
1192
|
+
SYLogger.warning(
|
|
1193
|
+
f"[DeepAgent] RunnableCallable monkey-patch FAILED: {_patch_err}")
|
|
1112
1194
|
|
|
1113
1195
|
agent = _create_deep_agent(**agent_kwargs)
|
|
1114
|
-
print(
|
|
1196
|
+
print(
|
|
1197
|
+
f"[DeepAgent] Agent created, type={type(agent).__name__}", flush=True)
|
|
1115
1198
|
|
|
1116
1199
|
# 恢复原始 __init__
|
|
1117
1200
|
if _original_rc_init is not None:
|
|
@@ -1194,19 +1277,23 @@ async def _sync_skills_to_sandbox(
|
|
|
1194
1277
|
pass
|
|
1195
1278
|
|
|
1196
1279
|
if remote_version and remote_version == local_version:
|
|
1197
|
-
SYLogger.debug(
|
|
1280
|
+
SYLogger.debug(
|
|
1281
|
+
f"[DeepAgent] 技能版本一致,跳过: {skill_name} v{local_version}")
|
|
1198
1282
|
continue
|
|
1199
1283
|
|
|
1200
1284
|
# 版本不一致或沙箱无版本,删除后重新上传
|
|
1201
1285
|
try:
|
|
1202
1286
|
await backend.aexecute(f"rm -rf /skills/{skill_name}")
|
|
1203
|
-
SYLogger.info(
|
|
1287
|
+
SYLogger.info(
|
|
1288
|
+
f"[DeepAgent] 技能版本不一致,覆盖: {skill_name} ({remote_version or '无版本'} → {local_version})")
|
|
1204
1289
|
except Exception as e:
|
|
1205
|
-
SYLogger.warning(
|
|
1290
|
+
SYLogger.warning(
|
|
1291
|
+
f"[DeepAgent] 删除旧版技能失败: {skill_name}, {e}")
|
|
1206
1292
|
continue
|
|
1207
1293
|
|
|
1208
1294
|
await backend.async_sync_dirs([(src, f"/skills/{skill_name}")])
|
|
1209
|
-
SYLogger.info(
|
|
1295
|
+
SYLogger.info(
|
|
1296
|
+
f"[DeepAgent] 同步技能到沙箱: {skill_name} v{local_version}")
|
|
1210
1297
|
except Exception as e:
|
|
1211
1298
|
SYLogger.warning(f"[DeepAgent] 技能同步失败: {e}")
|
|
1212
1299
|
|
|
@@ -182,9 +182,10 @@ _orig_build_new_messages = _OrigDeepAgentsSumm._build_new_messages_with_path
|
|
|
182
182
|
def _patched_build_new_messages(self, summary, file_path):
|
|
183
183
|
content = (
|
|
184
184
|
"<internal_context_data>\n"
|
|
185
|
-
"
|
|
186
|
-
"
|
|
187
|
-
"
|
|
185
|
+
"[系统内部记忆]\n"
|
|
186
|
+
"这是你的内部记忆,帮助你回忆之前的对话。"
|
|
187
|
+
"把它当作你自己的回忆,而不是要输出的内容。"
|
|
188
|
+
"绝对不要在回复中提及、复述或引用此内容的任何部分。\n\n"
|
|
188
189
|
)
|
|
189
190
|
if file_path is not None:
|
|
190
191
|
content += (
|
{sycommon_python_lib-0.2.5a35 → sycommon_python_lib-0.2.5a37}/src/sycommon/middleware/traceid.py
RENAMED
|
@@ -40,10 +40,7 @@ def setup_trace_id_handler(app):
|
|
|
40
40
|
request_body = json.loads(raw_text)
|
|
41
41
|
else:
|
|
42
42
|
request_body = await request.json()
|
|
43
|
-
# 截断过大的 JSON body(如包含 base64 文件内容的请求)
|
|
44
43
|
body_str = json.dumps(request_body, ensure_ascii=False)
|
|
45
|
-
if len(body_str) > 5000:
|
|
46
|
-
request_body = {"_truncated": f"请求体 {len(body_str)} 字节,已省略"}
|
|
47
44
|
except Exception:
|
|
48
45
|
try:
|
|
49
46
|
request_body = await request.json()
|