sycommon-python-lib 0.2.5a27__tar.gz → 0.2.5a28__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.5a27 → sycommon_python_lib-0.2.5a28}/PKG-INFO +7 -7
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/pyproject.toml +7 -7
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/agent/deep_agent.py +341 -11
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/agent/multi_agent_team.py +18 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/heartbeat_process/heartbeat_process_worker.py +69 -0
- sycommon_python_lib-0.2.5a28/src/sycommon/synacos/dns_cache.py +67 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/synacos/nacos_heartbeat_manager.py +70 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon_python_lib.egg-info/PKG-INFO +7 -7
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon_python_lib.egg-info/SOURCES.txt +1 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon_python_lib.egg-info/requires.txt +6 -6
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/README.md +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/setup.cfg +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/cli.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/core/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/core/console.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/core/models.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/core/project.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/core/utils.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/agent/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/agent/agent/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/agent/agent/main_agent.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/agent/agent/nodes/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/agent/agent/nodes/example_node.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/agent/agent/states/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/agent/agent/states/agent_state.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/agent/api/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/agent/api/query.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/agent/api/sse/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/agent/api/sse/agent.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/agent/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/agent/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/agent/db/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/agent/db/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/agent/db/model/entity.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/agent/db/service.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/agent/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/agent/model/parse.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/agent/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/agent/tools/mq.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/base/.env.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/base/.gitignore.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/base/Dockerfile.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/base/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/base/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/base/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/base/app.yaml.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/base/client/FileServiceClient.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/base/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/base/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/base/model/file_info.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/base/requirements.txt.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/cli/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/cli/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/cli/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/cli/commands/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/cli/commands/hello.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/cli/pyproject.toml.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/cli/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/web/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/web/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/web/api/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/web/api/echo.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/web/api/sse/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/web/api/sse/echo.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/web/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/web/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/web/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/web/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/command/templates/web/tools/mq.py.tpl +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/nexus/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/__main__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/agents/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/agents/factory.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/agents/prompts.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/cdp/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/cdp/browser.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/cdp/capabilities/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/cdp/capabilities/console.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/cdp/capabilities/dom.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/cdp/capabilities/network.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/cdp/capabilities/page_errors.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/cdp/capabilities/performance.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/cdp/capabilities/screenshot.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/cdp/client.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/cdp/protocol.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/cdp/repl.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/cli.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/commands/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/commands/cdp_cmd.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/commands/chat_cmd.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/commands/create_cmd.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/commands/evaluate_cmd.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/commands/init_cmd.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/commands/memory_cmd.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/commands/resume_cmd.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/commands/rollback_cmd.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/commands/run_cmd.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/core/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/core/backend.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/core/config.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/core/display.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/core/git_integration.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/core/llm.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/core/state.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/evaluate/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/evaluate/api_evaluator.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/memory/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/memory/compressor.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/memory/full.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/memory/hot.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/memory/manager.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/memory/warm.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/mode/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/mode/create.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/mode/optimize.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/models/config_models.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/rl/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/rl/baseline_tests.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/rl/checkpoint.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/rl/convergence.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/rl/diagnosis.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/rl/engine.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/rl/environment.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/rl/experience.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/rl/harness_prompts.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/rl/history.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/rl/optimization_logger.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/rl/pre_validation.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/rl/reward.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/rl/strategy_bandit.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/rl/strategy_generator.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/rl/strategy_prompts.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycli/skills/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/agent/agent_manager.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/agent/chat_events.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/agent/mcp/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/agent/mcp/models.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/agent/mcp/tool_loader.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/agent/sandbox/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/agent/sandbox/file_ops.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/agent/sandbox/http_sandbox_backend.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/agent/sandbox/minio_sync.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/agent/sandbox/sandbox_pool.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/agent/sandbox/sandbox_recovery.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/agent/sandbox/session.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/agent/summarization_utils.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/auth/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/auth/ldap_service.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/auth/oa_cache.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/auth/oa_crypto.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/auth/oa_service.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/auth/wecom_ldap_service.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/config/Config.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/config/DatabaseConfig.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/config/ElasticsearchConfig.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/config/EmbeddingConfig.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/config/LLMConfig.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/config/LangfuseConfig.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/config/MQConfig.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/config/PgConfig.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/config/RedisConfig.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/config/RerankerConfig.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/config/SentryConfig.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/config/XxlJobConfig.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/config/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/database/async_base_db_service.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/database/async_database_service.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/database/base_db_service.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/database/database_service.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/database/elasticsearch_service.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/database/pg_checkpoint_service.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/database/redis_service.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/database/token_usage_db_service.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/health/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/health/health_check.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/health/metrics.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/health/ping.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/heartbeat_process/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/heartbeat_process/heartbeat_config.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/heartbeat_process/heartbeat_process_manager.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/llm/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/llm/embedding.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/llm/get_llm.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/llm/llm_logger.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/llm/llm_tokens.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/llm/llm_with_token_tracking.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/llm/native_with_fallback_runnable.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/llm/output_fixing_runnable.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/llm/struct_token.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/llm/sy_langfuse.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/llm/tiktoken_cache/9b5ad71b2ce5302211f9c61530b329a4922fc6a4 +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/llm/tiktoken_cache/fb374d419588a4632f3f557e76b4b70aebbca790 +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/llm/token_usage_es_service.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/llm/token_usage_mysql_service.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/llm/usage_token.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/logging/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/logging/async_sql_logger.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/logging/kafka_log.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/logging/logger_levels.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/logging/logger_wrapper.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/logging/process_logger.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/logging/sql_logger.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/mcp_server/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/mcp_server/server.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/middleware/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/middleware/context.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/middleware/cors.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/middleware/docs.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/middleware/exception.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/middleware/middleware.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/middleware/monitor_memory.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/middleware/mq.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/middleware/sandbox.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/middleware/timeout.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/middleware/token_tracking.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/middleware/tool_result_truncation.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/middleware/traceid.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/models/base_http.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/models/log.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/models/mcp_server_config.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/models/mqlistener_config.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/models/mqmsg_model.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/models/mqsend_config.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/models/sandbox.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/models/sso_user.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/models/token_usage.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/models/token_usage_mysql.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/models/xxljob_handler_config.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/notice/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/notice/uvicorn_monitor.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/notice/wecom_message.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/rabbitmq/process_pool_consumer.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/rabbitmq/rabbitmq_client.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/rabbitmq/rabbitmq_pool.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/rabbitmq/rabbitmq_service.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/rabbitmq/rabbitmq_service_client_manager.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/rabbitmq/rabbitmq_service_connection_monitor.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/rabbitmq/rabbitmq_service_consumer_manager.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/rabbitmq/rabbitmq_service_core.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/rabbitmq/rabbitmq_service_producer_manager.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/sentry/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/sentry/sy_sentry.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/services.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/sse/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/sse/event.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/sse/sse.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/synacos/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/synacos/example.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/synacos/example2.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/synacos/feign.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/synacos/feign_client.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/synacos/nacos_client_base.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/synacos/nacos_config_manager.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/synacos/nacos_service.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/synacos/nacos_service_discovery.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/synacos/nacos_service_registration.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/synacos/param.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/tests/deep_agent_server.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/tests/test_consumer_recovery.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/tests/test_deep_agent.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/tests/test_dynamic_max_tokens.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/tests/test_email.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/tests/test_encoding_cache.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/tests/test_mcp_server.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/tests/test_minimax_reasoning.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/tests/test_mq.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/tests/test_oa_login.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/tests/test_real_summarization.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/tests/test_summarization_config.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/tests/test_summarization_real.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/tools/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/tools/async_utils.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/tools/docs.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/tools/env.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/tools/merge_headers.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/tools/snowflake.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/tools/syemail.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/tools/timing.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/xxljob/__init__.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/xxljob/xxljob_service.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon_python_lib.egg-info/dependency_links.txt +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon_python_lib.egg-info/entry_points.txt +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon_python_lib.egg-info/top_level.txt +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/tests/test_asyncio_logging.py +0 -0
- {sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/tests/test_sycli.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sycommon-python-lib
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.5a28
|
|
4
4
|
Summary: Add your description here
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -9,15 +9,15 @@ Requires-Dist: aiohttp==3.13.5
|
|
|
9
9
|
Requires-Dist: aiomysql==0.3.2
|
|
10
10
|
Requires-Dist: anyio==4.13.0
|
|
11
11
|
Requires-Dist: decorator==5.3.1
|
|
12
|
-
Requires-Dist: deepagents==0.6.
|
|
12
|
+
Requires-Dist: deepagents==0.6.7
|
|
13
13
|
Requires-Dist: elasticsearch==9.4.1
|
|
14
14
|
Requires-Dist: fastapi==0.136.3
|
|
15
15
|
Requires-Dist: jinja2==3.1.6
|
|
16
16
|
Requires-Dist: kafka-python==2.3.1
|
|
17
17
|
Requires-Dist: langchain==1.3.2
|
|
18
18
|
Requires-Dist: langchain-core==1.4.0
|
|
19
|
-
Requires-Dist: langchain-openai==1.2.
|
|
20
|
-
Requires-Dist: langfuse==4.
|
|
19
|
+
Requires-Dist: langchain-openai==1.2.2
|
|
20
|
+
Requires-Dist: langfuse==4.7.1
|
|
21
21
|
Requires-Dist: langgraph==1.2.2
|
|
22
22
|
Requires-Dist: langgraph-checkpoint-postgres==3.1.0
|
|
23
23
|
Requires-Dist: langgraph-checkpoint-redis==0.4.1
|
|
@@ -29,12 +29,12 @@ Requires-Dist: psutil==7.2.2
|
|
|
29
29
|
Requires-Dist: pyxxl==0.4.7
|
|
30
30
|
Requires-Dist: pydantic==2.13.4
|
|
31
31
|
Requires-Dist: python-dotenv==1.2.2
|
|
32
|
-
Requires-Dist: python-multipart==0.0.
|
|
32
|
+
Requires-Dist: python-multipart==0.0.30
|
|
33
33
|
Requires-Dist: pyyaml==6.0.3
|
|
34
34
|
Requires-Dist: redis==7.4.0
|
|
35
|
-
Requires-Dist: sentry-sdk[fastapi]==2.
|
|
35
|
+
Requires-Dist: sentry-sdk[fastapi]==2.61.1
|
|
36
36
|
Requires-Dist: sqlalchemy[asyncio]==2.0.50
|
|
37
|
-
Requires-Dist: starlette[full]==1.1
|
|
37
|
+
Requires-Dist: starlette[full]==1.2.1
|
|
38
38
|
Requires-Dist: tiktoken==0.13.0
|
|
39
39
|
Requires-Dist: uvicorn==0.48.0
|
|
40
40
|
Requires-Dist: wecom-aibot-python-sdk==1.0.2
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "sycommon-python-lib"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.5a28"
|
|
4
4
|
description = "Add your description here"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
@@ -10,15 +10,15 @@ dependencies = [
|
|
|
10
10
|
"aiomysql==0.3.2",
|
|
11
11
|
"anyio==4.13.0",
|
|
12
12
|
"decorator==5.3.1",
|
|
13
|
-
"deepagents==0.6.
|
|
13
|
+
"deepagents==0.6.7",
|
|
14
14
|
"elasticsearch==9.4.1",
|
|
15
15
|
"fastapi==0.136.3",
|
|
16
16
|
"jinja2==3.1.6",
|
|
17
17
|
"kafka-python==2.3.1",
|
|
18
18
|
"langchain==1.3.2",
|
|
19
19
|
"langchain-core==1.4.0",
|
|
20
|
-
"langchain-openai==1.2.
|
|
21
|
-
"langfuse==4.
|
|
20
|
+
"langchain-openai==1.2.2",
|
|
21
|
+
"langfuse==4.7.1",
|
|
22
22
|
"langgraph==1.2.2",
|
|
23
23
|
"langgraph-checkpoint-postgres==3.1.0",
|
|
24
24
|
"langgraph-checkpoint-redis==0.4.1",
|
|
@@ -30,12 +30,12 @@ dependencies = [
|
|
|
30
30
|
"pyxxl==0.4.7",
|
|
31
31
|
"pydantic==2.13.4",
|
|
32
32
|
"python-dotenv==1.2.2",
|
|
33
|
-
"python-multipart==0.0.
|
|
33
|
+
"python-multipart==0.0.30",
|
|
34
34
|
"pyyaml==6.0.3",
|
|
35
35
|
"redis==7.4.0",
|
|
36
|
-
"sentry-sdk[fastapi]==2.
|
|
36
|
+
"sentry-sdk[fastapi]==2.61.1",
|
|
37
37
|
"sqlalchemy[asyncio]==2.0.50",
|
|
38
|
-
"starlette[full]==1.1
|
|
38
|
+
"starlette[full]==1.2.1",
|
|
39
39
|
"tiktoken==0.13.0",
|
|
40
40
|
"uvicorn==0.48.0",
|
|
41
41
|
"wecom-aibot-python-sdk==1.0.2",
|
{sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/agent/deep_agent.py
RENAMED
|
@@ -37,11 +37,12 @@
|
|
|
37
37
|
import asyncio
|
|
38
38
|
import json
|
|
39
39
|
import os
|
|
40
|
+
from collections.abc import Awaitable, Callable
|
|
40
41
|
from pathlib import Path
|
|
41
|
-
from typing import Any, AsyncGenerator,
|
|
42
|
+
from typing import Any, AsyncGenerator, Dict, List, Optional, Tuple, TYPE_CHECKING
|
|
42
43
|
|
|
43
44
|
from pydantic import BaseModel, Field
|
|
44
|
-
from langchain_core.messages import HumanMessage, BaseMessage
|
|
45
|
+
from langchain_core.messages import HumanMessage, BaseMessage, AIMessageChunk, AIMessage, SystemMessage
|
|
45
46
|
from langchain_core.tools import BaseTool, tool
|
|
46
47
|
|
|
47
48
|
from sycommon.logging.kafka_log import SYLogger
|
|
@@ -56,6 +57,161 @@ from sycommon.agent.summarization_utils import build_summarization_middleware
|
|
|
56
57
|
|
|
57
58
|
if TYPE_CHECKING:
|
|
58
59
|
from deepagents.graph import CompiledStateGraph
|
|
60
|
+
from langchain.agents.middleware.types import AgentState, ContextT, ModelRequest, ModelResponse, ResponseT
|
|
61
|
+
from langgraph.runtime import Runtime
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def _patch_agent_streaming(agent):
|
|
65
|
+
"""Monkey-patch factory.py _execute_model_async to fix stream_mode="messages".
|
|
66
|
+
|
|
67
|
+
根因: langchain factory.py (<=1.3.2) 的 _execute_model_async 有两个问题:
|
|
68
|
+
1. 调用 model_.ainvoke(messages) 不传 config → callbacks 不传播
|
|
69
|
+
2. 使用 ainvoke (非流式) 而非 astream → on_llm_new_token 不触发
|
|
70
|
+
|
|
71
|
+
修复: 替换 amodel_node 闭包中的 _execute_model_async, 改用 astream 并传入
|
|
72
|
+
从 ContextVar 读取的 config。astream 每个 token 触发 on_llm_new_token,
|
|
73
|
+
StreamMessagesHandler 拦截后推送给 stream_mode="messages" 的消费者。
|
|
74
|
+
|
|
75
|
+
为什么是最内层替换(而非 Middleware): _execute_model_async 位于所有中间件
|
|
76
|
+
(含 deepagents tail 的 MemoryMiddleware/FilesystemMiddleware 等会 modify_request
|
|
77
|
+
的 awrap_model_call)的最内层。替换它不绕过任何中间件; 用 Middleware 方案则只能
|
|
78
|
+
插在"用户中间件"层, 会绕过更内层的 MemoryMiddleware 注入。故保留 monkey-patch。
|
|
79
|
+
|
|
80
|
+
加固: 闭包结构按"自由变量名"定位 cell(不依赖固定索引), 任一不符即跳过 patch
|
|
81
|
+
并降级为非流式(功能正常, 只是不逐 token 推送), 而非打错补丁导致静默失效。
|
|
82
|
+
|
|
83
|
+
TODO: 等官方修复 (langchain >1.3.x, _execute_model_async 改用 astream) 后
|
|
84
|
+
删除此函数及调用即可。
|
|
85
|
+
"""
|
|
86
|
+
# 已验证兼容的版本范围(超出仅警告, 不阻断 —— 闭包强校验是真正的安全网)
|
|
87
|
+
_VERIFIED = {"langchain": "1.3.2", "langchain_core": "1.4.0"}
|
|
88
|
+
try:
|
|
89
|
+
import langchain as _lc
|
|
90
|
+
import langchain_core as _lcc
|
|
91
|
+
_cur = {"langchain": getattr(_lc, "__version__", "?"),
|
|
92
|
+
"langchain_core": getattr(_lcc, "__version__", "?")}
|
|
93
|
+
if _cur != _VERIFIED:
|
|
94
|
+
SYLogger.warning(
|
|
95
|
+
f"[StreamingPatch] langchain 版本 {_cur} 与已验证 {_VERIFIED} 不一致; "
|
|
96
|
+
f"闭包强校验仍会兜底, 但建议复核 _execute_model_async 是否已改用 astream")
|
|
97
|
+
except Exception:
|
|
98
|
+
pass
|
|
99
|
+
|
|
100
|
+
try:
|
|
101
|
+
from langchain_core.messages import AIMessageChunk as _AIC, AIMessage as _AIM
|
|
102
|
+
from langchain_core.runnables.config import var_child_runnable_config
|
|
103
|
+
|
|
104
|
+
print(f"[StreamingPatch] agent.nodes: {list(agent.nodes.keys())}", flush=True)
|
|
105
|
+
node = agent.nodes.get("model")
|
|
106
|
+
if node is None:
|
|
107
|
+
print("[StreamingPatch] model node not found, skip", flush=True)
|
|
108
|
+
SYLogger.warning("[DeepAgent] model node not found, skip streaming patch")
|
|
109
|
+
return
|
|
110
|
+
|
|
111
|
+
inner = node.node # RunnableSeq
|
|
112
|
+
print(f"[StreamingPatch] inner type: {type(inner).__name__}", flush=True)
|
|
113
|
+
if not hasattr(inner, 'steps') or not inner.steps:
|
|
114
|
+
print(f"[StreamingPatch] no steps, inner={inner}", flush=True)
|
|
115
|
+
SYLogger.warning("[DeepAgent] model node has no steps, skip streaming patch")
|
|
116
|
+
return
|
|
117
|
+
|
|
118
|
+
step0 = inner.steps[0] # RunnableCallable(trace=False, afunc=amodel_node)
|
|
119
|
+
print(f"[StreamingPatch] step0 type: {type(step0).__name__}, trace={getattr(step0, 'trace', 'N/A')}", flush=True)
|
|
120
|
+
afunc = getattr(step0, "afunc", None) # amodel_node
|
|
121
|
+
if afunc is None or afunc.__closure__ is None:
|
|
122
|
+
SYLogger.warning("[DeepAgent] amodel_node afunc/closure 缺失, skip streaming patch")
|
|
123
|
+
return
|
|
124
|
+
print(f"[StreamingPatch] afunc: {afunc.__name__}, freevars={afunc.__code__.co_freevars}", flush=True)
|
|
125
|
+
|
|
126
|
+
# ---- 按自由变量名定位 cell(不依赖固定索引)----
|
|
127
|
+
def _cell_by_name(fn, name):
|
|
128
|
+
"""从闭包函数 fn 中按 co_freevars 名取出对应 cell 对象(取不到返回 None)。"""
|
|
129
|
+
names = fn.__code__.co_freevars
|
|
130
|
+
if name not in names or fn.__closure__ is None:
|
|
131
|
+
return None
|
|
132
|
+
return fn.__closure__[names.index(name)]
|
|
133
|
+
|
|
134
|
+
exec_cell = _cell_by_name(afunc, "_execute_model_async")
|
|
135
|
+
if exec_cell is None:
|
|
136
|
+
SYLogger.warning(
|
|
137
|
+
f"[DeepAgent] amodel_node 闭包未含 _execute_model_async "
|
|
138
|
+
f"(freevars={afunc.__code__.co_freevars}), skip streaming patch")
|
|
139
|
+
return
|
|
140
|
+
|
|
141
|
+
original_execute = exec_cell.cell_contents
|
|
142
|
+
# 强校验 _execute_model_async 自身的闭包含预期三个自由变量
|
|
143
|
+
_gbm_cell = _cell_by_name(original_execute, "_get_bound_model")
|
|
144
|
+
_hmo_cell = _cell_by_name(original_execute, "_handle_model_output")
|
|
145
|
+
_name_cell = _cell_by_name(original_execute, "name")
|
|
146
|
+
if _gbm_cell is None or _hmo_cell is None:
|
|
147
|
+
SYLogger.warning(
|
|
148
|
+
f"[DeepAgent] _execute_model_async 闭包结构不符 "
|
|
149
|
+
f"(freevars={getattr(original_execute, '__code__', None) and original_execute.__code__.co_freevars}), "
|
|
150
|
+
f"skip streaming patch(降级为非流式,功能正常)")
|
|
151
|
+
return
|
|
152
|
+
_get_bound_model = _gbm_cell.cell_contents
|
|
153
|
+
_handle_model_output = _hmo_cell.cell_contents
|
|
154
|
+
_name = _name_cell.cell_contents if _name_cell is not None else None
|
|
155
|
+
|
|
156
|
+
async def _patched_execute_model_async(request):
|
|
157
|
+
"""替代 factory._execute_model_async: 用 astream + config 实现流式回调。"""
|
|
158
|
+
from langchain.agents.middleware.types import ModelResponse
|
|
159
|
+
|
|
160
|
+
model_, effective_response_format = _get_bound_model(request)
|
|
161
|
+
messages = request.messages
|
|
162
|
+
if request.system_message:
|
|
163
|
+
messages = [request.system_message, *messages]
|
|
164
|
+
|
|
165
|
+
# 从 ContextVar 读取 LangGraph 注入的 config(含 StreamMessagesHandler)
|
|
166
|
+
config = var_child_runnable_config.get()
|
|
167
|
+
|
|
168
|
+
# 用 astream 替代 ainvoke, 每个 token 触发 on_llm_new_token
|
|
169
|
+
# 注意: ChatModel.astream() 产出的是 AIMessageChunk(BaseMessageChunk),
|
|
170
|
+
# 不是 ChatGenerationChunk,因此累加结果直接就是消息本身,没有 .message 属性。
|
|
171
|
+
chunks: list = []
|
|
172
|
+
async for chunk in model_.astream(messages, config=config):
|
|
173
|
+
chunks.append(chunk)
|
|
174
|
+
|
|
175
|
+
if not chunks:
|
|
176
|
+
# astream 无产出时降级到原始 ainvoke(不走流式)
|
|
177
|
+
SYLogger.warning("[StreamingPatch] astream returned empty, fallback to ainvoke")
|
|
178
|
+
output = await model_.ainvoke(messages, config=config)
|
|
179
|
+
else:
|
|
180
|
+
generation = chunks[0]
|
|
181
|
+
for c in chunks[1:]:
|
|
182
|
+
generation += c
|
|
183
|
+
# astream 累加结果可能是 AIMessageChunk(多数情况)或包裹了 .message 的
|
|
184
|
+
# ChatGenerationChunk(少数自定义模型)。两种都兼容。
|
|
185
|
+
ai_message = getattr(generation, "message", generation)
|
|
186
|
+
if isinstance(ai_message, _AIC):
|
|
187
|
+
ai_message = _AIM(
|
|
188
|
+
content=ai_message.content,
|
|
189
|
+
additional_kwargs=ai_message.additional_kwargs,
|
|
190
|
+
tool_calls=ai_message.tool_calls,
|
|
191
|
+
usage_metadata=getattr(ai_message, "usage_metadata", None),
|
|
192
|
+
response_metadata=getattr(ai_message, "response_metadata", {}),
|
|
193
|
+
id=ai_message.id,
|
|
194
|
+
)
|
|
195
|
+
output = ai_message
|
|
196
|
+
|
|
197
|
+
if _name:
|
|
198
|
+
output.name = _name
|
|
199
|
+
|
|
200
|
+
handled_output = _handle_model_output(output, effective_response_format)
|
|
201
|
+
return ModelResponse(
|
|
202
|
+
result=handled_output["messages"],
|
|
203
|
+
structured_response=handled_output.get("structured_response"),
|
|
204
|
+
)
|
|
205
|
+
|
|
206
|
+
# 替换闭包 cell → amodel_node 调用 patched 版本
|
|
207
|
+
exec_cell.cell_contents = _patched_execute_model_async
|
|
208
|
+
SYLogger.info(
|
|
209
|
+
f"[DeepAgent] _execute_model_async patched (astream + config) "
|
|
210
|
+
f"| langchain={_cur.get('langchain')} core={_cur.get('langchain_core')}")
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
except Exception as e:
|
|
214
|
+
SYLogger.warning(f"[DeepAgent] streaming patch failed: {e}")
|
|
59
215
|
|
|
60
216
|
|
|
61
217
|
@tool
|
|
@@ -109,6 +265,10 @@ class AgentConfig(BaseModel):
|
|
|
109
265
|
sandbox_service_name: str = "shengye-platform-sandbox"
|
|
110
266
|
sandbox_timeout: int = 300
|
|
111
267
|
skills_dir: Optional[str] = None
|
|
268
|
+
# 技能是否已同步到沙箱:True 时跳过 _sync_skills_to_sandbox 的 atree 检查,
|
|
269
|
+
# 但仍会基于 skills_dir 注入 /skills(即 SkillsMiddleware 照常挂载)。
|
|
270
|
+
# 注意:不要用「把 skills_dir 置 None」来跳过同步——那会连带关闭技能注入。
|
|
271
|
+
skills_already_synced: bool = False
|
|
112
272
|
memory_dir: Optional[str] = None
|
|
113
273
|
|
|
114
274
|
# 工具
|
|
@@ -197,11 +357,43 @@ class DeepAgent:
|
|
|
197
357
|
input_state = {"messages": [HumanMessage(content=message)]}
|
|
198
358
|
if rubric:
|
|
199
359
|
input_state["rubric"] = rubric
|
|
360
|
+
print(f"[DeepAgent] chat() starting stream, message={repr(message[:80])}", flush=True)
|
|
200
361
|
async for chunk in self._astream_with_retry(
|
|
201
362
|
input_state,
|
|
202
363
|
max_retries=3,
|
|
203
364
|
base_delay=1.0,
|
|
204
365
|
):
|
|
366
|
+
# 🔑 详细打印 chunk 内容
|
|
367
|
+
_chunk_len = len(chunk) if isinstance(chunk, tuple) else '?'
|
|
368
|
+
if isinstance(chunk, tuple) and _chunk_len == 2:
|
|
369
|
+
# 2-tuple: either (namespace, (msg, meta)) or (msg, meta)
|
|
370
|
+
if isinstance(chunk[1], tuple) and len(chunk[1]) == 2:
|
|
371
|
+
_ns = repr(chunk[0])[:30]
|
|
372
|
+
_msg = chunk[1][0]
|
|
373
|
+
_meta = chunk[1][1]
|
|
374
|
+
else:
|
|
375
|
+
_ns = '()'
|
|
376
|
+
_msg = chunk[0]
|
|
377
|
+
_meta = chunk[1]
|
|
378
|
+
_msg_type = type(_msg).__name__
|
|
379
|
+
_content = repr(str(getattr(_msg, 'content', ''))[:80])
|
|
380
|
+
_node = _meta.get('langgraph_node', '?') if isinstance(_meta, dict) else '?'
|
|
381
|
+
_step = _meta.get('langgraph_step', '?') if isinstance(_meta, dict) else '?'
|
|
382
|
+
print(f"[DeepAgent] 2tuple: ns={_ns} msg={_msg_type} node={_node} step={_step} content={_content}", flush=True)
|
|
383
|
+
elif isinstance(chunk, tuple) and _chunk_len == 3:
|
|
384
|
+
namespace_p, _tag_p, payload_p = chunk
|
|
385
|
+
if isinstance(payload_p, tuple) and len(payload_p) == 2:
|
|
386
|
+
_msg = payload_p[0]
|
|
387
|
+
_meta = payload_p[1]
|
|
388
|
+
_msg_type = type(_msg).__name__
|
|
389
|
+
_content = repr(str(getattr(_msg, 'content', ''))[:80])
|
|
390
|
+
_node = _meta.get('langgraph_node', '?') if isinstance(_meta, dict) else '?'
|
|
391
|
+
_step = _meta.get('langgraph_step', '?') if isinstance(_meta, dict) else '?'
|
|
392
|
+
print(f"[DeepAgent] 3tuple: ns={repr(namespace_p)[:30]} msg={_msg_type} node={_node} step={_step} content={_content}", flush=True)
|
|
393
|
+
else:
|
|
394
|
+
print(f"[DeepAgent] 3tuple: payload_type={type(payload_p).__name__}", flush=True)
|
|
395
|
+
else:
|
|
396
|
+
print(f"[DeepAgent] chunk: type={type(chunk).__name__}", flush=True)
|
|
205
397
|
# 检查取消
|
|
206
398
|
if cancel_event and cancel_event.is_set():
|
|
207
399
|
event = ChatEventBuilder.cancelled("任务已取消")
|
|
@@ -212,8 +404,17 @@ class DeepAgent:
|
|
|
212
404
|
return
|
|
213
405
|
|
|
214
406
|
# 解析 chunk(subgraphs=True 格式)
|
|
407
|
+
# LangGraph v1.2+ 输出 3-tuple: (namespace, "messages", (message, metadata))
|
|
408
|
+
# 兼容旧版 2-tuple: (namespace, (message, metadata)) 或 (message, metadata)
|
|
215
409
|
namespace = ()
|
|
216
|
-
if isinstance(chunk, tuple) and len(chunk) ==
|
|
410
|
+
if isinstance(chunk, tuple) and len(chunk) == 3:
|
|
411
|
+
# 新格式: (namespace, "messages", (message, metadata))
|
|
412
|
+
namespace, _tag, payload = chunk
|
|
413
|
+
if isinstance(payload, tuple) and len(payload) == 2:
|
|
414
|
+
msg, metadata = payload
|
|
415
|
+
else:
|
|
416
|
+
continue
|
|
417
|
+
elif isinstance(chunk, tuple) and len(chunk) == 2:
|
|
217
418
|
if isinstance(chunk[1], tuple) and len(chunk[1]) == 2:
|
|
218
419
|
namespace, (msg, metadata) = chunk
|
|
219
420
|
else:
|
|
@@ -223,10 +424,29 @@ class DeepAgent:
|
|
|
223
424
|
|
|
224
425
|
stream_step += 1
|
|
225
426
|
|
|
427
|
+
# ===== 🔑 诊断日志:详细记录每个 chunk =====
|
|
428
|
+
_chunk_type = type(chunk).__name__
|
|
429
|
+
_msg_type = getattr(msg, '__class__.__name__', '?') if msg else 'None'
|
|
430
|
+
_ns = namespace if namespace else '()'
|
|
431
|
+
_node = metadata.get("langgraph_node", "?") if metadata else "?"
|
|
432
|
+
_step = metadata.get("langgraph_step", "?") if metadata else "?"
|
|
433
|
+
_content_preview = ""
|
|
434
|
+
if isinstance(msg, BaseMessage):
|
|
435
|
+
_c = msg.content or ""
|
|
436
|
+
_content_preview = repr(_c[:80]) if _c else "(empty)"
|
|
437
|
+
SYLogger.info(
|
|
438
|
+
f"[DeepAgent #{stream_step}] chunk_type={_chunk_type} msg_type={_msg_type} "
|
|
439
|
+
f"ns={_ns} node={_node} step={_step} content={_content_preview}")
|
|
440
|
+
|
|
226
441
|
# ===== 日志(仅关键节点) =====
|
|
227
442
|
if isinstance(msg, BaseMessage):
|
|
228
443
|
msg_type = msg.__class__.__name__
|
|
229
444
|
|
|
445
|
+
# 🔑 跳过 subgraphs=True 导致的重复 HumanMessage
|
|
446
|
+
# (父图和子图都会发射 HumanMessage,只处理根命名空间的)
|
|
447
|
+
if msg_type == "HumanMessage" and namespace != ():
|
|
448
|
+
continue
|
|
449
|
+
|
|
230
450
|
# 累积 token 统计(流式 chunk 中的 usage_metadata 兜底)
|
|
231
451
|
if msg_type in ("AIMessage", "AIMessageChunk"):
|
|
232
452
|
usage_meta = getattr(msg, "usage_metadata", None)
|
|
@@ -249,8 +469,17 @@ class DeepAgent:
|
|
|
249
469
|
SYLogger.debug(
|
|
250
470
|
f"[DeepAgent #{stream_step}] tool_call | {tc_l.get('name','?')} | args={args_str}")
|
|
251
471
|
elif not (msg.content or ""):
|
|
252
|
-
|
|
253
|
-
|
|
472
|
+
# 检查是否有 reasoning_content(思考模式下内容在 reasoning_content 而非 content)
|
|
473
|
+
_rc = (
|
|
474
|
+
getattr(msg, "reasoning_content", None)
|
|
475
|
+
or getattr(msg, "additional_kwargs", {}).get("reasoning_content", None)
|
|
476
|
+
)
|
|
477
|
+
if _rc:
|
|
478
|
+
SYLogger.debug(
|
|
479
|
+
f"[DeepAgent #{stream_step}] chunk | reasoning_content={repr(str(_rc)[:80])}")
|
|
480
|
+
else:
|
|
481
|
+
SYLogger.debug(
|
|
482
|
+
f"[DeepAgent #{stream_step}] chunk | (empty)")
|
|
254
483
|
elif msg_type == "AIMessage":
|
|
255
484
|
content_log = (msg.content or "")[:100]
|
|
256
485
|
tc_names = [tc.get('name', '?')
|
|
@@ -302,13 +531,45 @@ class DeepAgent:
|
|
|
302
531
|
await on_event(event)
|
|
303
532
|
yield event
|
|
304
533
|
|
|
534
|
+
print(f"[DeepAgent] post-yield: msg_type={type(msg).__name__}, is_BaseMessage={isinstance(msg, BaseMessage)}", flush=True)
|
|
535
|
+
|
|
305
536
|
if not isinstance(msg, BaseMessage):
|
|
537
|
+
print(f"[DeepAgent] SKIPPING non-BaseMessage: {type(msg).__name__}", flush=True)
|
|
306
538
|
continue
|
|
307
539
|
|
|
308
540
|
msg_type = msg.__class__.__name__
|
|
309
|
-
|
|
541
|
+
raw_content = msg.content
|
|
542
|
+
# 🔑 处理 content 为 list 的情况(多模态模型)
|
|
543
|
+
if isinstance(raw_content, list):
|
|
544
|
+
content = "".join(
|
|
545
|
+
item.get("text", "") if isinstance(item, dict) else str(item)
|
|
546
|
+
for item in raw_content
|
|
547
|
+
)
|
|
548
|
+
else:
|
|
549
|
+
content = raw_content or ""
|
|
310
550
|
|
|
311
551
|
if msg_type in ("AIMessage", "AIMessageChunk"):
|
|
552
|
+
# 🔑 提取 reasoning_content(思考/推理内容)
|
|
553
|
+
# 模型在 thinking 模式下会将推理过程放在 reasoning_content 字段,
|
|
554
|
+
# 而不是 content 字段。ChatOpenAI 不提取此字段,需要手动处理。
|
|
555
|
+
reasoning_content = (
|
|
556
|
+
getattr(msg, "reasoning_content", None)
|
|
557
|
+
or getattr(msg, "additional_kwargs", {}).get(
|
|
558
|
+
"reasoning_content", None
|
|
559
|
+
)
|
|
560
|
+
)
|
|
561
|
+
if reasoning_content:
|
|
562
|
+
ai_text_content += reasoning_content
|
|
563
|
+
event = ChatEventBuilder.ai_chunk(
|
|
564
|
+
reasoning_content,
|
|
565
|
+
id=getattr(msg, "id", None),
|
|
566
|
+
agent=DEFAULT_AGENT_NAME,
|
|
567
|
+
)
|
|
568
|
+
event.data["reasoning"] = True
|
|
569
|
+
if on_event:
|
|
570
|
+
await on_event(event)
|
|
571
|
+
yield event
|
|
572
|
+
|
|
312
573
|
# 处理 tool_call_chunks(流式分片逐步到达,args 是字符串片段)
|
|
313
574
|
tool_call_chunks = getattr(msg, "tool_call_chunks", [])
|
|
314
575
|
if tool_call_chunks:
|
|
@@ -482,6 +743,8 @@ class DeepAgent:
|
|
|
482
743
|
SYLogger.debug(
|
|
483
744
|
f"[DeepAgent] AI chunk done | {repr(ai_chunk_buffer[:100])}...")
|
|
484
745
|
|
|
746
|
+
print(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)
|
|
747
|
+
|
|
485
748
|
# 空响应检测:模型被调用但没有产出任何文本
|
|
486
749
|
if not ai_text_content and not ai_chunk_buffer:
|
|
487
750
|
SYLogger.warning(
|
|
@@ -513,12 +776,16 @@ class DeepAgent:
|
|
|
513
776
|
yield event
|
|
514
777
|
|
|
515
778
|
except asyncio.CancelledError:
|
|
779
|
+
print("[DeepAgent] chat() CancelledError!", flush=True)
|
|
516
780
|
event = ChatEventBuilder.cancelled("任务已取消")
|
|
517
781
|
if on_event:
|
|
518
782
|
await on_event(event)
|
|
519
783
|
yield event
|
|
520
784
|
raise
|
|
521
785
|
except Exception as e:
|
|
786
|
+
print(f"[DeepAgent] chat() Exception: {type(e).__name__}: {e}", flush=True)
|
|
787
|
+
import traceback
|
|
788
|
+
traceback.print_exc()
|
|
522
789
|
SYLogger.error(f"[DeepAgent] 聊天异常: {e}")
|
|
523
790
|
event = ChatEventBuilder.error(str(e))
|
|
524
791
|
if on_event:
|
|
@@ -533,7 +800,13 @@ class DeepAgent:
|
|
|
533
800
|
|
|
534
801
|
def _parse_chunk(self, chunk) -> Tuple[Optional[BaseMessage], Optional[Dict]]:
|
|
535
802
|
"""解析流式响应的 chunk"""
|
|
536
|
-
if isinstance(chunk, tuple) and len(chunk) ==
|
|
803
|
+
if isinstance(chunk, tuple) and len(chunk) == 3:
|
|
804
|
+
# LangGraph v1.2+: (namespace, "messages", (message, metadata))
|
|
805
|
+
_ns, _tag, payload = chunk
|
|
806
|
+
if isinstance(payload, tuple) and len(payload) == 2:
|
|
807
|
+
msg, metadata = payload
|
|
808
|
+
return msg, metadata
|
|
809
|
+
elif isinstance(chunk, tuple) and len(chunk) == 2:
|
|
537
810
|
if isinstance(chunk[1], tuple) and len(chunk[1]) == 2:
|
|
538
811
|
_, (msg, metadata) = chunk
|
|
539
812
|
else:
|
|
@@ -561,19 +834,27 @@ class DeepAgent:
|
|
|
561
834
|
sandbox_retries = 0
|
|
562
835
|
max_sandbox_retries = 3
|
|
563
836
|
|
|
564
|
-
|
|
837
|
+
try:
|
|
838
|
+
while True:
|
|
565
839
|
for attempt in range(max_retries):
|
|
566
840
|
try:
|
|
841
|
+
print(f"[DeepAgent] _astream_with_retry: attempt={attempt}, starting astream...", flush=True)
|
|
842
|
+
chunk_count = 0
|
|
567
843
|
async for chunk in self.agent.astream(
|
|
568
844
|
input_data,
|
|
569
845
|
config=self.config,
|
|
570
846
|
stream_mode="messages",
|
|
571
847
|
subgraphs=True
|
|
572
848
|
):
|
|
849
|
+
chunk_count += 1
|
|
850
|
+
print(f"[DeepAgent] _astream yielding chunk #{chunk_count}", flush=True)
|
|
573
851
|
yield chunk
|
|
852
|
+
print(f"[DeepAgent] _astream yield returned, consumer processed chunk #{chunk_count}", flush=True)
|
|
853
|
+
print(f"[DeepAgent] _astream_with_retry: stream ended normally, total_chunks={chunk_count}", flush=True)
|
|
574
854
|
return
|
|
575
855
|
except (APIConnectionError, APIError, APITimeoutError, ConnectionError, httpx.RemoteProtocolError) as e:
|
|
576
856
|
last_error = e
|
|
857
|
+
print(f"[DeepAgent] _astream_with_retry: API error: {type(e).__name__}: {e}", flush=True)
|
|
577
858
|
if attempt < max_retries - 1:
|
|
578
859
|
delay = base_delay * (2 ** attempt)
|
|
579
860
|
SYLogger.warning(
|
|
@@ -609,6 +890,12 @@ class DeepAgent:
|
|
|
609
890
|
raise
|
|
610
891
|
else:
|
|
611
892
|
break
|
|
893
|
+
except GeneratorExit:
|
|
894
|
+
print("[DeepAgent] _astream_with_retry: GeneratorExit! Consumer closed the generator!", flush=True)
|
|
895
|
+
raise
|
|
896
|
+
except Exception as e:
|
|
897
|
+
print(f"[DeepAgent] _astream_with_retry: Unexpected exception: {type(e).__name__}: {e}", flush=True)
|
|
898
|
+
raise
|
|
612
899
|
|
|
613
900
|
|
|
614
901
|
async def create_deep_agent(
|
|
@@ -651,6 +938,18 @@ async def create_deep_agent(
|
|
|
651
938
|
wrap_structured=False,
|
|
652
939
|
)
|
|
653
940
|
|
|
941
|
+
# 🔑 提取底层 ChatOpenAI 原始模型
|
|
942
|
+
# LLMWithTokenTracking 重写了 _agenerate(非流式路径),
|
|
943
|
+
# 导致 ainvoke 不走 astream 路径。
|
|
944
|
+
# 本文件的 _patch_agent_streaming() 会替换模型节点的 _execute_model_async,
|
|
945
|
+
# 改用 model.astream() 触发流式回调;提取 raw_model 确保 astream / bind_tools
|
|
946
|
+
# 等方法在原始 ChatOpenAI 上工作,而不是被 LLMWithTokenTracking 的包装拦截。
|
|
947
|
+
raw_model = getattr(model, 'llm', model)
|
|
948
|
+
if raw_model is not model:
|
|
949
|
+
print(f"[DeepAgent] 提取原始模型: {type(model).__name__} → {type(raw_model).__name__}", flush=True)
|
|
950
|
+
if hasattr(raw_model, 'streaming'):
|
|
951
|
+
raw_model.streaming = True
|
|
952
|
+
|
|
654
953
|
# 创建 checkpointer
|
|
655
954
|
if checkpointer is None:
|
|
656
955
|
from sycommon.database.pg_checkpoint_service import PgCheckpointService
|
|
@@ -664,13 +963,15 @@ async def create_deep_agent(
|
|
|
664
963
|
agent_config = {"configurable": {"thread_id": tid}}
|
|
665
964
|
|
|
666
965
|
# 确定沙箱路径
|
|
667
|
-
# skills_dir: 本地目录路径 →
|
|
966
|
+
# skills_dir: 本地目录路径 → 注入沙箱 /skills(SkillsMiddleware 据此挂载)
|
|
668
967
|
# memory_dir: 非路径字符串 → 标记启用沙箱 /memory/AGENTS.md
|
|
669
968
|
skills_path = "/skills" if config.skills_dir else None
|
|
670
969
|
memory_path = "/memory/AGENTS.md" if config.memory_dir else None
|
|
671
970
|
|
|
672
971
|
# 同步 skills 到沙箱(按目录名检查,已存在则跳过)
|
|
673
|
-
|
|
972
|
+
# 仅在未同步过时执行 atree 检查 + 上传;skills_already_synced=True 时跳过同步,
|
|
973
|
+
# 但 skills_path 注入不受影响,确保 SkillsMiddleware 始终能挂载。
|
|
974
|
+
if config.skills_dir and sandbox_backend and not config.skills_already_synced:
|
|
674
975
|
await _sync_skills_to_sandbox(config.skills_dir, sandbox_backend)
|
|
675
976
|
|
|
676
977
|
# 创建 agent
|
|
@@ -706,7 +1007,7 @@ async def create_deep_agent(
|
|
|
706
1007
|
))
|
|
707
1008
|
|
|
708
1009
|
agent_kwargs = {
|
|
709
|
-
"model":
|
|
1010
|
+
"model": raw_model,
|
|
710
1011
|
"tools": config.tools or [get_current_date],
|
|
711
1012
|
"backend": sandbox_backend,
|
|
712
1013
|
"checkpointer": checkpointer,
|
|
@@ -719,7 +1020,36 @@ async def create_deep_agent(
|
|
|
719
1020
|
if memory_path:
|
|
720
1021
|
agent_kwargs["memory"] = [memory_path]
|
|
721
1022
|
|
|
1023
|
+
# 🔑 RunnableCallable trace=True monkey-patch
|
|
1024
|
+
# 确保 LangGraph 的回调链传播到所有子 runnable,
|
|
1025
|
+
# 使 var_child_runnable_config ContextVar 能被正确设置。
|
|
1026
|
+
_original_rc_init = None
|
|
1027
|
+
try:
|
|
1028
|
+
from langgraph._internal._runnable import RunnableCallable
|
|
1029
|
+
|
|
1030
|
+
_original_rc_init = RunnableCallable.__init__
|
|
1031
|
+
|
|
1032
|
+
def _patched_rc_init(self_, *args, **kwargs):
|
|
1033
|
+
kwargs['trace'] = True
|
|
1034
|
+
_original_rc_init(self_, *args, **kwargs)
|
|
1035
|
+
|
|
1036
|
+
RunnableCallable.__init__ = _patched_rc_init
|
|
1037
|
+
except Exception as _patch_err:
|
|
1038
|
+
SYLogger.warning(f"[DeepAgent] RunnableCallable monkey-patch FAILED: {_patch_err}")
|
|
1039
|
+
|
|
722
1040
|
agent = _create_deep_agent(**agent_kwargs)
|
|
1041
|
+
print(f"[DeepAgent] Agent created, type={type(agent).__name__}", flush=True)
|
|
1042
|
+
|
|
1043
|
+
# 恢复原始 __init__
|
|
1044
|
+
if _original_rc_init is not None:
|
|
1045
|
+
try:
|
|
1046
|
+
RunnableCallable.__init__ = _original_rc_init
|
|
1047
|
+
except Exception:
|
|
1048
|
+
pass
|
|
1049
|
+
|
|
1050
|
+
# 🔑 Patch _execute_model_async: 将 ainvoke 替换为 astream + config
|
|
1051
|
+
# 修复 stream_mode="messages" 只返回 1 chunk 的问题
|
|
1052
|
+
_patch_agent_streaming(agent)
|
|
723
1053
|
|
|
724
1054
|
recovery_manager = SandboxRecoveryManager(sandbox_backend)
|
|
725
1055
|
|
{sycommon_python_lib-0.2.5a27 → sycommon_python_lib-0.2.5a28}/src/sycommon/agent/multi_agent_team.py
RENAMED
|
@@ -271,6 +271,24 @@ class MultiAgentTeam:
|
|
|
271
271
|
content = msg.content or ""
|
|
272
272
|
|
|
273
273
|
if msg_type in ("AIMessage", "AIMessageChunk"):
|
|
274
|
+
# 🔑 提取 reasoning_content(思考/推理内容)
|
|
275
|
+
reasoning_content = (
|
|
276
|
+
getattr(msg, "reasoning_content", None)
|
|
277
|
+
or getattr(msg, "additional_kwargs", {}).get(
|
|
278
|
+
"reasoning_content", None
|
|
279
|
+
)
|
|
280
|
+
)
|
|
281
|
+
if reasoning_content:
|
|
282
|
+
event = ChatEventBuilder.ai_chunk(
|
|
283
|
+
reasoning_content,
|
|
284
|
+
id=getattr(msg, "id", None),
|
|
285
|
+
agent=current_agent,
|
|
286
|
+
)
|
|
287
|
+
event.data["reasoning"] = True
|
|
288
|
+
if on_event:
|
|
289
|
+
await on_event(event)
|
|
290
|
+
yield event
|
|
291
|
+
|
|
274
292
|
tool_calls = getattr(msg, "tool_calls", [])
|
|
275
293
|
|
|
276
294
|
if tool_calls:
|