sycommon-python-lib 0.2.1b10__tar.gz → 0.2.2a1__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.1b10 → sycommon_python_lib-0.2.2a1}/PKG-INFO +11 -11
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/pyproject.toml +13 -12
- sycommon_python_lib-0.2.2a1/src/nexus/__init__.py +97 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/agents/prompts.py +88 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/commands/resume_cmd.py +107 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/mode/create.py +4 -4
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/models/config_models.py +8 -0
- sycommon_python_lib-0.2.2a1/src/sycli/rl/baseline_tests.py +245 -0
- sycommon_python_lib-0.2.2a1/src/sycli/rl/checkpoint.py +497 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/rl/convergence.py +83 -12
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/rl/diagnosis.py +14 -7
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/rl/engine.py +407 -31
- sycommon_python_lib-0.2.2a1/src/sycli/rl/environment.py +489 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/rl/experience.py +27 -0
- sycommon_python_lib-0.2.2a1/src/sycli/rl/optimization_logger.py +264 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/rl/reward.py +39 -13
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/rl/strategy_bandit.py +80 -7
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/rl/strategy_generator.py +17 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/rl/strategy_prompts.py +4 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/llm/get_llm.py +1 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/middleware/sandbox.py +24 -8
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon_python_lib.egg-info/PKG-INFO +11 -11
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon_python_lib.egg-info/SOURCES.txt +4 -1
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon_python_lib.egg-info/entry_points.txt +1 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon_python_lib.egg-info/requires.txt +10 -10
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon_python_lib.egg-info/top_level.txt +1 -0
- sycommon_python_lib-0.2.2a1/tests/test_sycli.py +1873 -0
- sycommon_python_lib-0.2.1b10/src/command/templates/__pycache__/__init__.cpython-311.pyc +0 -0
- sycommon_python_lib-0.2.1b10/src/sycli/rl/environment.py +0 -237
- sycommon_python_lib-0.2.1b10/tests/test_sycli.py +0 -880
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/README.md +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/setup.cfg +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/cli.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/core/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/core/console.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/core/models.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/core/project.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/core/utils.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/agent/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/agent/agent/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/agent/agent/main_agent.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/agent/agent/nodes/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/agent/agent/nodes/example_node.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/agent/agent/states/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/agent/agent/states/agent_state.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/agent/api/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/agent/api/query.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/agent/api/sse/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/agent/api/sse/agent.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/agent/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/agent/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/agent/db/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/agent/db/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/agent/db/model/entity.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/agent/db/service.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/agent/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/agent/model/parse.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/agent/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/agent/tools/mq.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/base/.env.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/base/.gitignore.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/base/Dockerfile.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/base/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/base/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/base/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/base/app.yaml.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/base/client/FileServiceClient.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/base/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/base/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/base/model/file_info.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/base/requirements.txt.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/web/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/web/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/web/api/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/web/api/echo.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/web/api/sse/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/web/api/sse/echo.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/web/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/web/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/web/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/web/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/command/templates/web/tools/mq.py.tpl +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/__main__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/agents/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/agents/factory.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/cdp/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/cdp/browser.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/cdp/capabilities/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/cdp/capabilities/console.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/cdp/capabilities/dom.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/cdp/capabilities/network.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/cdp/capabilities/page_errors.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/cdp/capabilities/performance.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/cdp/capabilities/screenshot.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/cdp/client.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/cdp/protocol.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/cdp/repl.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/cli.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/commands/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/commands/cdp_cmd.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/commands/chat_cmd.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/commands/create_cmd.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/commands/evaluate_cmd.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/commands/init_cmd.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/commands/memory_cmd.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/commands/rollback_cmd.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/commands/run_cmd.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/core/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/core/backend.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/core/config.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/core/display.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/core/git_integration.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/core/llm.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/core/state.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/evaluate/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/evaluate/api_evaluator.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/memory/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/memory/compressor.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/memory/full.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/memory/hot.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/memory/manager.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/memory/warm.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/mode/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/mode/optimize.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/rl/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/rl/harness_prompts.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/rl/history.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/rl/pre_validation.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/skills/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/agent/agent_manager.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/agent/chat_events.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/agent/deep_agent.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/agent/multi_agent_team.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/agent/sandbox/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/agent/sandbox/file_ops.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/agent/sandbox/http_sandbox_backend.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/agent/sandbox/sandbox_pool.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/agent/sandbox/sandbox_recovery.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/agent/sandbox/session.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/auth/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/auth/ldap_service.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/auth/wecom_ldap_service.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/config/Config.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/config/DatabaseConfig.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/config/ElasticsearchConfig.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/config/EmbeddingConfig.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/config/LLMConfig.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/config/LangfuseConfig.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/config/MQConfig.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/config/RedisConfig.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/config/RerankerConfig.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/config/SentryConfig.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/config/XxlJobConfig.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/config/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/database/async_base_db_service.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/database/async_database_service.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/database/base_db_service.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/database/database_service.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/database/elasticsearch_service.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/database/redis_service.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/database/token_usage_db_service.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/health/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/health/health_check.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/health/metrics.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/health/ping.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/heartbeat_process/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/heartbeat_process/heartbeat_config.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/heartbeat_process/heartbeat_process_manager.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/heartbeat_process/heartbeat_process_worker.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/llm/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/llm/embedding.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/llm/llm_logger.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/llm/llm_tokens.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/llm/llm_with_token_tracking.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/llm/native_with_fallback_runnable.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/llm/output_fixing_runnable.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/llm/struct_token.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/llm/sy_langfuse.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/llm/token_usage_es_service.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/llm/token_usage_mysql_service.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/llm/usage_token.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/logging/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/logging/async_sql_logger.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/logging/kafka_log.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/logging/logger_levels.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/logging/logger_wrapper.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/logging/process_logger.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/logging/sql_logger.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/middleware/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/middleware/background_execution.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/middleware/context.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/middleware/cors.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/middleware/docs.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/middleware/exception.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/middleware/middleware.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/middleware/monitor_memory.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/middleware/mq.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/middleware/timeout.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/middleware/token_tracking.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/middleware/traceid.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/models/base_http.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/models/log.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/models/mqlistener_config.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/models/mqmsg_model.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/models/mqsend_config.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/models/sandbox.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/models/sso_user.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/models/token_usage.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/models/token_usage_mysql.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/models/xxljob_handler_config.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/notice/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/notice/uvicorn_monitor.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/rabbitmq/process_pool_consumer.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/rabbitmq/rabbitmq_client.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/rabbitmq/rabbitmq_pool.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/rabbitmq/rabbitmq_service.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/rabbitmq/rabbitmq_service_client_manager.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/rabbitmq/rabbitmq_service_connection_monitor.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/rabbitmq/rabbitmq_service_consumer_manager.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/rabbitmq/rabbitmq_service_core.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/rabbitmq/rabbitmq_service_producer_manager.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/sentry/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/sentry/sy_sentry.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/services.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/sse/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/sse/event.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/sse/sse.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/synacos/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/synacos/example.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/synacos/example2.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/synacos/feign.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/synacos/feign_client.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/synacos/nacos_client_base.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/synacos/nacos_config_manager.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/synacos/nacos_heartbeat_manager.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/synacos/nacos_service.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/synacos/nacos_service_discovery.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/synacos/nacos_service_registration.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/synacos/param.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/tests/deep_agent_server.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/tests/test_deep_agent.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/tests/test_email.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/tests/test_mq.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/tools/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/tools/async_utils.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/tools/docs.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/tools/env.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/tools/merge_headers.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/tools/snowflake.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/tools/syemail.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/tools/timing.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/xxljob/__init__.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon/xxljob/xxljob_service.py +0 -0
- {sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycommon_python_lib.egg-info/dependency_links.txt +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.2a1
|
|
4
4
|
Summary: Add your description here
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -9,33 +9,33 @@ Requires-Dist: aiohttp>=3.13.5
|
|
|
9
9
|
Requires-Dist: aiomysql>=0.3.2
|
|
10
10
|
Requires-Dist: anyio>=4.12.1
|
|
11
11
|
Requires-Dist: decorator>=5.2.1
|
|
12
|
-
Requires-Dist: deepagents>=0.5.
|
|
12
|
+
Requires-Dist: deepagents>=0.5.3
|
|
13
13
|
Requires-Dist: elasticsearch>=9.3.0
|
|
14
|
-
Requires-Dist: fastapi>=0.
|
|
14
|
+
Requires-Dist: fastapi>=0.136.0
|
|
15
15
|
Requires-Dist: jinja2>=3.1.6
|
|
16
16
|
Requires-Dist: kafka-python>=2.3.1
|
|
17
17
|
Requires-Dist: langchain>=1.2.15
|
|
18
|
-
Requires-Dist: langchain-core>=1.
|
|
19
|
-
Requires-Dist: langchain-openai>=1.
|
|
20
|
-
Requires-Dist: langfuse>=4.
|
|
21
|
-
Requires-Dist: langgraph>=1.1.
|
|
22
|
-
Requires-Dist: langgraph-checkpoint-redis>=0.4.
|
|
18
|
+
Requires-Dist: langchain-core>=1.3.0
|
|
19
|
+
Requires-Dist: langchain-openai>=1.2.0
|
|
20
|
+
Requires-Dist: langfuse>=4.5.0
|
|
21
|
+
Requires-Dist: langgraph>=1.1.9
|
|
22
|
+
Requires-Dist: langgraph-checkpoint-redis>=0.4.1
|
|
23
23
|
Requires-Dist: ldap3>=2.9.1
|
|
24
24
|
Requires-Dist: loguru>=0.7.3
|
|
25
25
|
Requires-Dist: mysql-connector-python>=9.6.0
|
|
26
26
|
Requires-Dist: nacos-sdk-python<3.0,>=2.0.11
|
|
27
27
|
Requires-Dist: psutil>=7.2.2
|
|
28
28
|
Requires-Dist: pyxxl>=0.4.6
|
|
29
|
-
Requires-Dist: pydantic>=2.
|
|
29
|
+
Requires-Dist: pydantic>=2.13.3
|
|
30
30
|
Requires-Dist: python-dotenv>=1.2.2
|
|
31
31
|
Requires-Dist: python-multipart>=0.0.26
|
|
32
32
|
Requires-Dist: pyyaml>=6.0.3
|
|
33
33
|
Requires-Dist: redis>=7.3.0
|
|
34
|
-
Requires-Dist: sentry-sdk[fastapi]>=2.
|
|
34
|
+
Requires-Dist: sentry-sdk[fastapi]>=2.58.0
|
|
35
35
|
Requires-Dist: sqlalchemy[asyncio]>=2.0.48
|
|
36
36
|
Requires-Dist: starlette[full]>=1.0.0
|
|
37
37
|
Requires-Dist: tiktoken>=0.12.0
|
|
38
|
-
Requires-Dist: uvicorn>=0.
|
|
38
|
+
Requires-Dist: uvicorn>=0.45.0
|
|
39
39
|
Requires-Dist: wecom-aibot-python-sdk>=1.0.2
|
|
40
40
|
|
|
41
41
|
# sycommon-python-lib
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "sycommon-python-lib"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.2a1"
|
|
4
4
|
description = "Add your description here"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
@@ -10,38 +10,38 @@ dependencies = [
|
|
|
10
10
|
"aiomysql>=0.3.2",
|
|
11
11
|
"anyio>=4.12.1",
|
|
12
12
|
"decorator>=5.2.1",
|
|
13
|
-
"deepagents>=0.5.
|
|
13
|
+
"deepagents>=0.5.3",
|
|
14
14
|
"elasticsearch>=9.3.0",
|
|
15
|
-
"fastapi>=0.
|
|
15
|
+
"fastapi>=0.136.0",
|
|
16
16
|
"jinja2>=3.1.6",
|
|
17
17
|
"kafka-python>=2.3.1",
|
|
18
18
|
"langchain>=1.2.15",
|
|
19
|
-
"langchain-core>=1.
|
|
20
|
-
"langchain-openai>=1.
|
|
21
|
-
"langfuse>=4.
|
|
22
|
-
"langgraph>=1.1.
|
|
23
|
-
"langgraph-checkpoint-redis>=0.4.
|
|
19
|
+
"langchain-core>=1.3.0",
|
|
20
|
+
"langchain-openai>=1.2.0",
|
|
21
|
+
"langfuse>=4.5.0",
|
|
22
|
+
"langgraph>=1.1.9",
|
|
23
|
+
"langgraph-checkpoint-redis>=0.4.1",
|
|
24
24
|
"ldap3>=2.9.1",
|
|
25
25
|
"loguru>=0.7.3",
|
|
26
26
|
"mysql-connector-python>=9.6.0",
|
|
27
27
|
"nacos-sdk-python>=2.0.11,<3.0",
|
|
28
28
|
"psutil>=7.2.2",
|
|
29
29
|
"pyxxl>=0.4.6",
|
|
30
|
-
"pydantic>=2.
|
|
30
|
+
"pydantic>=2.13.3",
|
|
31
31
|
"python-dotenv>=1.2.2",
|
|
32
32
|
"python-multipart>=0.0.26",
|
|
33
33
|
"pyyaml>=6.0.3",
|
|
34
34
|
"redis>=7.3.0",
|
|
35
|
-
"sentry-sdk[fastapi]>=2.
|
|
35
|
+
"sentry-sdk[fastapi]>=2.58.0",
|
|
36
36
|
"sqlalchemy[asyncio]>=2.0.48",
|
|
37
37
|
"starlette[full]>=1.0.0",
|
|
38
38
|
"tiktoken>=0.12.0",
|
|
39
|
-
"uvicorn>=0.
|
|
39
|
+
"uvicorn>=0.45.0",
|
|
40
40
|
"wecom-aibot-python-sdk>=1.0.2",
|
|
41
41
|
]
|
|
42
42
|
|
|
43
43
|
[tool.setuptools]
|
|
44
|
-
packages = {find = {where = ["src"]}}
|
|
44
|
+
packages = {find = {where = ["src"], exclude = ["*.__pycache__", "*.__pycache__.*"]}}
|
|
45
45
|
package-data = {command = ["templates/**/*", "templates/**/.*"]}
|
|
46
46
|
|
|
47
47
|
[build-system]
|
|
@@ -51,3 +51,4 @@ build-backend = "setuptools.build_meta"
|
|
|
51
51
|
[project.scripts]
|
|
52
52
|
sycommon = "command.cli:main"
|
|
53
53
|
sycli = "sycli.cli:main"
|
|
54
|
+
sypublish = "nexus:main"
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import aiohttp
|
|
2
|
+
import asyncio
|
|
3
|
+
import random
|
|
4
|
+
import argparse
|
|
5
|
+
import sys
|
|
6
|
+
import os
|
|
7
|
+
import glob
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
NEXUS_URL = "http://192.168.2.174:8081"
|
|
11
|
+
USERNAME = "T3N1bGNvZGUueGlhbw=="
|
|
12
|
+
PASSWORD = "T3N1bGNvZGUueGlhb0AxMjM="
|
|
13
|
+
REPOSITORY = "shengye"
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
async def upload(file_path: str, nexus_url: str = NEXUS_URL,
|
|
17
|
+
username: str = USERNAME, password: str = PASSWORD,
|
|
18
|
+
repository: str = REPOSITORY) -> bool:
|
|
19
|
+
if not os.path.exists(file_path):
|
|
20
|
+
print(f"File not found: {file_path}")
|
|
21
|
+
return False
|
|
22
|
+
|
|
23
|
+
jar = aiohttp.CookieJar(unsafe=True)
|
|
24
|
+
async with aiohttp.ClientSession(cookie_jar=jar) as session:
|
|
25
|
+
async with session.get(f"{nexus_url}/") as resp:
|
|
26
|
+
resp.raise_for_status()
|
|
27
|
+
|
|
28
|
+
async with session.post(
|
|
29
|
+
f"{nexus_url}/service/rapture/session",
|
|
30
|
+
data={"username": username, "password": password},
|
|
31
|
+
) as resp:
|
|
32
|
+
resp.raise_for_status()
|
|
33
|
+
|
|
34
|
+
csrf_token = str(random.random())
|
|
35
|
+
session.cookie_jar.update_cookies(
|
|
36
|
+
{"NX-ANTI-CSRF-TOKEN": csrf_token},
|
|
37
|
+
response_url=aiohttp.client.URL(nexus_url),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
filename = os.path.basename(file_path)
|
|
41
|
+
data = aiohttp.FormData()
|
|
42
|
+
data.add_field("NX-ANTI-CSRF-TOKEN", csrf_token)
|
|
43
|
+
data.add_field(
|
|
44
|
+
"asset0", open(file_path, "rb"),
|
|
45
|
+
filename=filename, content_type="application/octet-stream",
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
async with session.post(
|
|
49
|
+
f"{nexus_url}/service/rest/internal/ui/upload/{repository}",
|
|
50
|
+
data=data,
|
|
51
|
+
) as resp:
|
|
52
|
+
status = resp.status
|
|
53
|
+
text = await resp.text()
|
|
54
|
+
|
|
55
|
+
if status in (200, 204):
|
|
56
|
+
print(f"Upload successful: {filename} -> {repository}")
|
|
57
|
+
return True
|
|
58
|
+
else:
|
|
59
|
+
print(f"Upload failed ({status}): {text}")
|
|
60
|
+
return False
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def main():
|
|
64
|
+
parser = argparse.ArgumentParser(
|
|
65
|
+
prog="nexus-upload",
|
|
66
|
+
description="上传 whl 包到 Nexus 仓库",
|
|
67
|
+
)
|
|
68
|
+
parser.add_argument(
|
|
69
|
+
"file", nargs="?", default=None,
|
|
70
|
+
help="whl 文件路径 (默认: dist/*.whl 中最新的)",
|
|
71
|
+
)
|
|
72
|
+
parser.add_argument(
|
|
73
|
+
"--url", default=NEXUS_URL,
|
|
74
|
+
help=f"Nexus 地址 (默认: {NEXUS_URL})",
|
|
75
|
+
)
|
|
76
|
+
parser.add_argument(
|
|
77
|
+
"-r", "--repository", default=REPOSITORY,
|
|
78
|
+
help=f"仓库名称 (默认: {REPOSITORY})",
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
args = parser.parse_args()
|
|
82
|
+
|
|
83
|
+
if args.file:
|
|
84
|
+
file_path = args.file
|
|
85
|
+
else:
|
|
86
|
+
dist_files = sorted(glob.glob("dist/*.whl"))
|
|
87
|
+
if not dist_files:
|
|
88
|
+
print("No .whl file found in dist/")
|
|
89
|
+
sys.exit(1)
|
|
90
|
+
file_path = dist_files[-1]
|
|
91
|
+
|
|
92
|
+
ok = asyncio.run(upload(file_path, nexus_url=args.url, repository=args.repository))
|
|
93
|
+
sys.exit(0 if ok else 1)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
if __name__ == "__main__":
|
|
97
|
+
main()
|
|
@@ -379,3 +379,91 @@ SERVICE_REPORT:
|
|
|
379
379
|
notes: {any relevant notes about the service state}
|
|
380
380
|
```
|
|
381
381
|
"""
|
|
382
|
+
|
|
383
|
+
# ── Direction Correction (E2) ────────────────────────────────────
|
|
384
|
+
|
|
385
|
+
DIRECTION_CORRECTION_PROMPT = """\
|
|
386
|
+
你是一个架构纠偏专家。RL 优化 agent 已经在错误方向上持续了多轮。
|
|
387
|
+
|
|
388
|
+
## 失败轨迹
|
|
389
|
+
{failure_trajectory}
|
|
390
|
+
|
|
391
|
+
## 当前架构信息
|
|
392
|
+
- 框架: {framework}
|
|
393
|
+
- 架构模式: {architecture_pattern}
|
|
394
|
+
- 启动方式: {startup_method}
|
|
395
|
+
- 关键模块: {key_modules}
|
|
396
|
+
|
|
397
|
+
## 分析要求
|
|
398
|
+
1. 指出当前方向的**根本问题**(不是表面症状)
|
|
399
|
+
2. 分析为什么 LLM 一直在错误方向上尝试(可能的认知偏差)
|
|
400
|
+
3. 建议一个**完全不同**的架构/实现方向
|
|
401
|
+
4. 列出需要**避免**的策略类型
|
|
402
|
+
5. 列出**应该尝试**的策略类型
|
|
403
|
+
|
|
404
|
+
## 输出格式(严格遵守)
|
|
405
|
+
|
|
406
|
+
CORRECTION_ANALYSIS:
|
|
407
|
+
root_cause: |
|
|
408
|
+
(根本原因分析)
|
|
409
|
+
wrong_directions:
|
|
410
|
+
- (错误方向1)
|
|
411
|
+
- (错误方向2)
|
|
412
|
+
suggested_direction: |
|
|
413
|
+
(建议的新方向)
|
|
414
|
+
constraints:
|
|
415
|
+
- (必须遵守的约束1)
|
|
416
|
+
- (必须遵守的约束2)
|
|
417
|
+
avoid_strategies:
|
|
418
|
+
- (应避免的策略类型1)
|
|
419
|
+
- (应避免的策略类型2)
|
|
420
|
+
recommended_strategies:
|
|
421
|
+
- name: (策略名称)
|
|
422
|
+
approach: (具体方法)
|
|
423
|
+
focus: (聚焦领域)
|
|
424
|
+
"""
|
|
425
|
+
|
|
426
|
+
# ── Pre-Analysis (E5) ────────────────────────────────────────────
|
|
427
|
+
|
|
428
|
+
PRE_ANALYSIS_PROMPT = """\
|
|
429
|
+
你是一个项目分析专家。在开始 RL 优化前,请对项目进行深度预分析。
|
|
430
|
+
|
|
431
|
+
## 项目环境信息
|
|
432
|
+
{environment_info}
|
|
433
|
+
|
|
434
|
+
## 预分析目标
|
|
435
|
+
1. **启动方式分析**: 项目如何启动?有哪些可选的启动方式?
|
|
436
|
+
2. **架构模式识别**: 项目采用了什么架构模式?各模块职责是什么?
|
|
437
|
+
3. **方案优劣评估**: 当前架构方案的优势和不足是什么?
|
|
438
|
+
4. **风险识别**: 优化过程中可能遇到的主要风险
|
|
439
|
+
5. **优化建议**: 建议的优化方向和优先级
|
|
440
|
+
|
|
441
|
+
## 输出格式(严格遵守)
|
|
442
|
+
|
|
443
|
+
PRE_ANALYSIS:
|
|
444
|
+
startup_analysis:
|
|
445
|
+
primary_method: (主要启动方式)
|
|
446
|
+
alternative_methods: (其他可选方式)
|
|
447
|
+
configuration: (关键配置)
|
|
448
|
+
architecture_analysis:
|
|
449
|
+
pattern: (架构模式名称)
|
|
450
|
+
description: (模式描述)
|
|
451
|
+
modules:
|
|
452
|
+
- name: (模块名)
|
|
453
|
+
role: (职责描述)
|
|
454
|
+
dependencies: (依赖的其他模块)
|
|
455
|
+
data_flow: (数据流向描述)
|
|
456
|
+
strengths:
|
|
457
|
+
- (优势1)
|
|
458
|
+
- (优势2)
|
|
459
|
+
weaknesses:
|
|
460
|
+
- (不足1)
|
|
461
|
+
- (不足2)
|
|
462
|
+
risks:
|
|
463
|
+
- risk: (风险描述)
|
|
464
|
+
mitigation: (缓解措施)
|
|
465
|
+
optimization_priorities:
|
|
466
|
+
- priority: HIGH|MEDIUM|LOW
|
|
467
|
+
area: (优化领域)
|
|
468
|
+
reason: (原因)
|
|
469
|
+
"""
|
{sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/commands/resume_cmd.py
RENAMED
|
@@ -4,6 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import asyncio
|
|
6
6
|
import json
|
|
7
|
+
import subprocess
|
|
7
8
|
from pathlib import Path
|
|
8
9
|
|
|
9
10
|
from sycli.core.backend import create_backend
|
|
@@ -14,6 +15,99 @@ from sycli.mode.create import run_create
|
|
|
14
15
|
from sycli.mode.optimize import run_optimize
|
|
15
16
|
|
|
16
17
|
|
|
18
|
+
def _show_resume_summary(sycli_dir: Path, state: dict) -> None:
|
|
19
|
+
"""显示恢复前的进展摘要。"""
|
|
20
|
+
# 尝试从 optimization_log.jsonl 读取最近事件
|
|
21
|
+
log_file = sycli_dir / "optimization_log.jsonl"
|
|
22
|
+
if log_file.exists():
|
|
23
|
+
try:
|
|
24
|
+
recent_events: list[dict] = []
|
|
25
|
+
with open(log_file, encoding="utf-8") as f:
|
|
26
|
+
for line in f:
|
|
27
|
+
line = line.strip()
|
|
28
|
+
if line:
|
|
29
|
+
recent_events.append(json.loads(line))
|
|
30
|
+
# 只保留 round_end 事件
|
|
31
|
+
round_ends = [e for e in recent_events if e.get("event") == "round_end"]
|
|
32
|
+
if round_ends:
|
|
33
|
+
info("最近轮次:")
|
|
34
|
+
for ev in round_ends[-5:]:
|
|
35
|
+
data = ev.get("data", {})
|
|
36
|
+
r = ev.get("round", "?")
|
|
37
|
+
score = data.get("score", 0)
|
|
38
|
+
decision = data.get("decision", "?")
|
|
39
|
+
strategy = data.get("strategy", "")
|
|
40
|
+
info(f" R{r}: score={score:.3f}, decision={decision}, strategy={strategy}")
|
|
41
|
+
except Exception:
|
|
42
|
+
pass
|
|
43
|
+
|
|
44
|
+
# 从 rounds.json 读取最佳得分
|
|
45
|
+
rounds_file = sycli_dir / "rl" / "rounds.json"
|
|
46
|
+
if rounds_file.exists():
|
|
47
|
+
try:
|
|
48
|
+
with open(rounds_file) as f:
|
|
49
|
+
rounds = json.load(f)
|
|
50
|
+
if rounds:
|
|
51
|
+
best = max(rounds, key=lambda r: r.get("score", 0))
|
|
52
|
+
info(f"最佳轮次: R{best.get('round_number', '?')}, score={best.get('score', 0):.3f}")
|
|
53
|
+
total_rounds = len(rounds)
|
|
54
|
+
info(f"已完成轮次: {total_rounds}")
|
|
55
|
+
except Exception:
|
|
56
|
+
pass
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def _verify_git_state(project_root: Path, state: dict) -> tuple[bool, str]:
|
|
60
|
+
"""验证 git 状态与记录一致。
|
|
61
|
+
|
|
62
|
+
Returns:
|
|
63
|
+
(is_consistent, message)
|
|
64
|
+
"""
|
|
65
|
+
last_commit = state.get("last_git_commit", "")
|
|
66
|
+
if not last_commit:
|
|
67
|
+
return True, "无 git commit 记录(跳过校验)"
|
|
68
|
+
|
|
69
|
+
try:
|
|
70
|
+
result = subprocess.run(
|
|
71
|
+
["git", "rev-parse", "HEAD"],
|
|
72
|
+
capture_output=True, text=True, cwd=str(project_root), timeout=10,
|
|
73
|
+
)
|
|
74
|
+
if result.returncode != 0:
|
|
75
|
+
return True, "非 git 仓库(跳过校验)"
|
|
76
|
+
|
|
77
|
+
current = result.stdout.strip()
|
|
78
|
+
if current == last_commit:
|
|
79
|
+
return True, f"git HEAD 一致 ({current[:8]})"
|
|
80
|
+
|
|
81
|
+
# 检查是否有未提交的修改
|
|
82
|
+
status_result = subprocess.run(
|
|
83
|
+
["git", "status", "--porcelain"],
|
|
84
|
+
capture_output=True, text=True, cwd=str(project_root), timeout=10,
|
|
85
|
+
)
|
|
86
|
+
dirty = bool(status_result.stdout.strip())
|
|
87
|
+
|
|
88
|
+
msg = f"git HEAD 不一致: 记录={last_commit[:8]}, 当前={current[:8]}"
|
|
89
|
+
if dirty:
|
|
90
|
+
msg += "(且有未提交修改)"
|
|
91
|
+
return False, msg
|
|
92
|
+
|
|
93
|
+
except (FileNotFoundError, subprocess.TimeoutExpired):
|
|
94
|
+
return True, "git 不可用(跳过校验)"
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def _get_git_head(project_root: Path) -> str:
|
|
98
|
+
"""获取当前 git HEAD commit hash。"""
|
|
99
|
+
try:
|
|
100
|
+
result = subprocess.run(
|
|
101
|
+
["git", "rev-parse", "HEAD"],
|
|
102
|
+
capture_output=True, text=True, cwd=str(project_root), timeout=10,
|
|
103
|
+
)
|
|
104
|
+
if result.returncode == 0:
|
|
105
|
+
return result.stdout.strip()
|
|
106
|
+
except Exception:
|
|
107
|
+
pass
|
|
108
|
+
return ""
|
|
109
|
+
|
|
110
|
+
|
|
17
111
|
def handle_resume(args) -> int:
|
|
18
112
|
"""Handle `sycli resume` command - resume an interrupted optimization."""
|
|
19
113
|
project_root = Path(args.project_root or ".").resolve()
|
|
@@ -63,6 +157,19 @@ def handle_resume(args) -> int:
|
|
|
63
157
|
info(f"Status was: {status}")
|
|
64
158
|
info(f"Task: {task}")
|
|
65
159
|
|
|
160
|
+
# ── E4: 进展摘要 ──
|
|
161
|
+
info("")
|
|
162
|
+
info("── 进展摘要 ──")
|
|
163
|
+
_show_resume_summary(sycli_dir, state)
|
|
164
|
+
|
|
165
|
+
# ── E4: Git 状态校验 ──
|
|
166
|
+
info("")
|
|
167
|
+
info("── Git 状态校验 ──")
|
|
168
|
+
is_consistent, git_msg = _verify_git_state(project_root, state)
|
|
169
|
+
info(f" {git_msg}")
|
|
170
|
+
if not is_consistent:
|
|
171
|
+
warning("代码可能已被外部修改,优化结果可能不可预测。")
|
|
172
|
+
|
|
66
173
|
# Initialize components
|
|
67
174
|
try:
|
|
68
175
|
llm = create_llm(config.llm, streaming=True)
|
|
@@ -12,7 +12,7 @@ from typing import Any
|
|
|
12
12
|
from deepagents import create_deep_agent
|
|
13
13
|
from deepagents.backends.local_shell import LocalShellBackend
|
|
14
14
|
from langchain_core.language_models import BaseChatModel
|
|
15
|
-
from
|
|
15
|
+
from sycli.rl.checkpoint import FileCheckpointer
|
|
16
16
|
|
|
17
17
|
from sycli.agents.factory import build_subagents, _memory_middleware, _inject_project_root
|
|
18
18
|
from sycli.agents.prompts import ARCHITECT_PROMPT, DATA_ANALYST_PROMPT, ORCHESTRATOR_PROMPT
|
|
@@ -119,7 +119,7 @@ async def run_create(
|
|
|
119
119
|
header("Phase 3: Build & Iterate")
|
|
120
120
|
|
|
121
121
|
subagents = build_subagents(config, llm, backend, project_name, mode="create", project_root=str(sycli_dir.parent))
|
|
122
|
-
checkpointer =
|
|
122
|
+
checkpointer = FileCheckpointer(sycli_dir / "checkpoints")
|
|
123
123
|
thread_id = f"sycli-create-{project_name}-{uuid.uuid4().hex[:8]}"
|
|
124
124
|
|
|
125
125
|
agent = create_deep_agent(
|
|
@@ -355,7 +355,7 @@ async def _run_architect_phase(
|
|
|
355
355
|
system_prompt=_inject_project_root(ARCHITECT_PROMPT, str(backend.cwd)),
|
|
356
356
|
subagents=[researcher_subagent],
|
|
357
357
|
memory=[],
|
|
358
|
-
checkpointer=
|
|
358
|
+
checkpointer=FileCheckpointer(sycli_dir / "checkpoints"),
|
|
359
359
|
debug=False,
|
|
360
360
|
name="sycli-architect",
|
|
361
361
|
)
|
|
@@ -422,7 +422,7 @@ async def _run_data_analyst_phase(
|
|
|
422
422
|
system_prompt=_inject_project_root(DATA_ANALYST_PROMPT, str(backend.cwd)),
|
|
423
423
|
subagents=[researcher_subagent],
|
|
424
424
|
memory=[],
|
|
425
|
-
checkpointer=
|
|
425
|
+
checkpointer=FileCheckpointer(sycli_dir / "checkpoints"),
|
|
426
426
|
debug=False,
|
|
427
427
|
name="sycli-data-analyst",
|
|
428
428
|
)
|
{sycommon_python_lib-0.2.1b10 → sycommon_python_lib-0.2.2a1}/src/sycli/models/config_models.py
RENAMED
|
@@ -76,6 +76,7 @@ class RLSettings(BaseModel):
|
|
|
76
76
|
convergence_strategy: str = "window" # window | ema | patience
|
|
77
77
|
convergence_threshold: float = 0.05
|
|
78
78
|
convergence_window_size: int = 10
|
|
79
|
+
convergence_near_target_margin: float = 0.02 # 接近目标时的容差(#8)
|
|
79
80
|
regression_penalty_weight: float = 0.3
|
|
80
81
|
auto_fix_compilation: bool = True
|
|
81
82
|
auto_fix_max_retries: int = 5
|
|
@@ -84,6 +85,13 @@ class RLSettings(BaseModel):
|
|
|
84
85
|
exploration_epsilon_start: float = 0.3
|
|
85
86
|
exploration_epsilon_end: float = 0.05
|
|
86
87
|
exploration_epsilon_decay: float = 0.95
|
|
88
|
+
accept_threshold: float = 0.8 # ACCEPT 决策的准确率阈值,默认 0.8(#4)
|
|
89
|
+
experience_keep_rounds: int = 30 # 经验存储保留的最近轮数(#15)
|
|
90
|
+
perturbation_restart: bool = True # 停滞但未达标时是否扰动重启(#10)
|
|
91
|
+
max_bandit_arms: int = 20 # Bandit 最大臂数量,超过时淘汰低效臂(#6)
|
|
92
|
+
direction_correction_enabled: bool = True # 是否启用方向纠偏(E2)
|
|
93
|
+
direction_correction_rollback_threshold: int = 3 # 连续 ROLLBACK 触发数
|
|
94
|
+
direction_correction_decline_rounds: int = 5 # 持续下降触发轮数
|
|
87
95
|
|
|
88
96
|
|
|
89
97
|
class MemorySettings(BaseModel):
|