sycommon-python-lib 0.2.1a45__tar.gz → 0.2.1a46__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.1a45 → sycommon_python_lib-0.2.1a46}/PKG-INFO +9 -9
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/pyproject.toml +9 -9
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycli/cli.py +16 -0
- sycommon_python_lib-0.2.1a46/src/sycli/commands/chat_cmd.py +283 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycli/commands/create_cmd.py +3 -3
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycli/commands/evaluate_cmd.py +1 -1
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycli/commands/init_cmd.py +14 -10
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycli/commands/memory_cmd.py +1 -1
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycli/commands/resume_cmd.py +3 -3
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycli/commands/rollback_cmd.py +1 -1
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycli/commands/run_cmd.py +3 -3
- sycommon_python_lib-0.2.1a46/src/sycli/core/__init__.py +31 -0
- sycommon_python_lib-0.2.1a46/src/sycli/core/config.py +4 -0
- {sycommon_python_lib-0.2.1a45/src/sycli → sycommon_python_lib-0.2.1a46/src/sycli/core}/display.py +32 -0
- {sycommon_python_lib-0.2.1a45/src/sycli → sycommon_python_lib-0.2.1a46/src/sycli/core}/git_integration.py +44 -16
- sycommon_python_lib-0.2.1a46/src/sycli/core/state.py +29 -0
- sycommon_python_lib-0.2.1a46/src/sycli/memory/manager.py +241 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycli/memory/warm.py +7 -0
- sycommon_python_lib-0.2.1a46/src/sycli/mode/create.py +524 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycli/models/config_models.py +43 -22
- sycommon_python_lib-0.2.1a46/src/sycli/rl/engine.py +678 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycli/rl/reward.py +3 -1
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/agent/sandbox/file_ops.py +2 -2
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon_python_lib.egg-info/PKG-INFO +9 -9
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon_python_lib.egg-info/SOURCES.txt +8 -5
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon_python_lib.egg-info/requires.txt +8 -8
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/tests/test_sycli.py +202 -19
- sycommon_python_lib-0.2.1a45/src/sycli/config.py +0 -23
- sycommon_python_lib-0.2.1a45/src/sycli/memory/manager.py +0 -147
- sycommon_python_lib-0.2.1a45/src/sycli/mode/create.py +0 -567
- sycommon_python_lib-0.2.1a45/src/sycli/rl/engine.py +0 -391
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/README.md +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/setup.cfg +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/command/__init__.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/command/cli.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/command/core/__init__.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/command/core/console.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/command/core/models.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/command/core/project.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/command/core/utils.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/command/templates/__init__.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/command/templates/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/command/templates/base/__init__.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/command/templates/web/__init__.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycli/__init__.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycli/__main__.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycli/agents/__init__.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycli/agents/factory.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycli/agents/prompts.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycli/commands/__init__.py +0 -0
- {sycommon_python_lib-0.2.1a45/src/sycli → sycommon_python_lib-0.2.1a46/src/sycli/core}/backend.py +0 -0
- {sycommon_python_lib-0.2.1a45/src/sycli → sycommon_python_lib-0.2.1a46/src/sycli/core}/llm.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycli/memory/__init__.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycli/memory/compressor.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycli/memory/full.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycli/memory/hot.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycli/mode/__init__.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycli/mode/optimize.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycli/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycli/rl/__init__.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycli/rl/convergence.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycli/rl/history.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/__init__.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/agent/agent_manager.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/agent/chat_events.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/agent/deep_agent.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/agent/multi_agent_team.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/agent/sandbox/__init__.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/agent/sandbox/http_sandbox_backend.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/agent/sandbox/sandbox_pool.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/agent/sandbox/sandbox_recovery.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/agent/sandbox/session.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/auth/__init__.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/auth/ldap_service.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/config/Config.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/config/DatabaseConfig.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/config/ElasticsearchConfig.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/config/EmbeddingConfig.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/config/LLMConfig.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/config/LangfuseConfig.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/config/MQConfig.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/config/RedisConfig.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/config/RerankerConfig.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/config/SentryConfig.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/config/XxlJobConfig.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/config/__init__.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/database/async_base_db_service.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/database/async_database_service.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/database/base_db_service.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/database/database_service.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/database/elasticsearch_service.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/database/redis_service.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/database/token_usage_db_service.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/health/__init__.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/health/health_check.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/health/metrics.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/health/ping.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/heartbeat_process/__init__.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/heartbeat_process/heartbeat_config.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/heartbeat_process/heartbeat_process_manager.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/heartbeat_process/heartbeat_process_worker.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/llm/__init__.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/llm/embedding.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/llm/get_llm.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/llm/llm_logger.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/llm/llm_tokens.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/llm/llm_with_token_tracking.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/llm/native_with_fallback_runnable.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/llm/output_fixing_runnable.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/llm/struct_token.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/llm/sy_langfuse.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/llm/token_usage_es_service.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/llm/token_usage_mysql_service.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/llm/usage_token.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/logging/__init__.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/logging/async_sql_logger.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/logging/kafka_log.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/logging/logger_levels.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/logging/logger_wrapper.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/logging/process_logger.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/logging/sql_logger.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/middleware/__init__.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/middleware/background_execution.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/middleware/context.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/middleware/cors.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/middleware/docs.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/middleware/exception.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/middleware/middleware.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/middleware/monitor_memory.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/middleware/mq.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/middleware/sandbox.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/middleware/timeout.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/middleware/traceid.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/models/base_http.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/models/log.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/models/mqlistener_config.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/models/mqmsg_model.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/models/mqsend_config.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/models/sandbox.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/models/sso_user.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/models/token_usage.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/models/token_usage_mysql.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/models/xxljob_handler_config.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/notice/__init__.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/notice/uvicorn_monitor.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/rabbitmq/process_pool_consumer.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/rabbitmq/rabbitmq_client.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/rabbitmq/rabbitmq_pool.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/rabbitmq/rabbitmq_service.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/rabbitmq/rabbitmq_service_client_manager.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/rabbitmq/rabbitmq_service_connection_monitor.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/rabbitmq/rabbitmq_service_consumer_manager.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/rabbitmq/rabbitmq_service_core.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/rabbitmq/rabbitmq_service_producer_manager.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/sentry/__init__.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/sentry/sy_sentry.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/services.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/sse/__init__.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/sse/event.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/sse/sse.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/synacos/__init__.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/synacos/example.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/synacos/example2.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/synacos/feign.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/synacos/feign_client.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/synacos/nacos_client_base.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/synacos/nacos_config_manager.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/synacos/nacos_heartbeat_manager.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/synacos/nacos_service.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/synacos/nacos_service_discovery.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/synacos/nacos_service_registration.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/synacos/param.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/tests/deep_agent_server.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/tests/test_deep_agent.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/tests/test_email.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/tests/test_mq.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/tools/__init__.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/tools/async_utils.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/tools/docs.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/tools/env.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/tools/merge_headers.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/tools/snowflake.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/tools/syemail.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/tools/timing.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/xxljob/__init__.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon/xxljob/xxljob_service.py +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon_python_lib.egg-info/dependency_links.txt +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon_python_lib.egg-info/entry_points.txt +0 -0
- {sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycommon_python_lib.egg-info/top_level.txt +0 -0
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sycommon-python-lib
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1a46
|
|
4
4
|
Summary: Add your description here
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
7
7
|
Requires-Dist: aio-pika>=9.6.2
|
|
8
|
-
Requires-Dist: aiohttp>=3.13.
|
|
8
|
+
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
12
|
Requires-Dist: deepagents>=0.5.0a2
|
|
13
13
|
Requires-Dist: elasticsearch>=9.3.0
|
|
14
|
-
Requires-Dist: fastapi>=0.135.
|
|
14
|
+
Requires-Dist: fastapi>=0.135.3
|
|
15
15
|
Requires-Dist: jinja2>=3.1.6
|
|
16
16
|
Requires-Dist: kafka-python>=2.3.0
|
|
17
|
-
Requires-Dist: langchain>=1.2.
|
|
18
|
-
Requires-Dist: langchain-core>=1.2.
|
|
17
|
+
Requires-Dist: langchain>=1.2.14
|
|
18
|
+
Requires-Dist: langchain-core>=1.2.25
|
|
19
19
|
Requires-Dist: langchain-openai>=1.1.11
|
|
20
|
-
Requires-Dist: langfuse>=4.0.
|
|
21
|
-
Requires-Dist: langgraph>=1.1.
|
|
20
|
+
Requires-Dist: langfuse>=4.0.6
|
|
21
|
+
Requires-Dist: langgraph>=1.1.4
|
|
22
22
|
Requires-Dist: langgraph-checkpoint-redis>=0.4.0
|
|
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
|
-
Requires-Dist: nacos-sdk-python<3.0,>=2.0.
|
|
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
29
|
Requires-Dist: pydantic>=2.12.5
|
|
@@ -31,7 +31,7 @@ Requires-Dist: python-dotenv>=1.2.2
|
|
|
31
31
|
Requires-Dist: python-multipart>=0.0.22
|
|
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.57.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
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "sycommon-python-lib"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.1a46"
|
|
4
4
|
description = "Add your description here"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
7
7
|
dependencies = [
|
|
8
8
|
"aio-pika>=9.6.2",
|
|
9
|
-
"aiohttp>=3.13.
|
|
9
|
+
"aiohttp>=3.13.5",
|
|
10
10
|
"aiomysql>=0.3.2",
|
|
11
11
|
"anyio>=4.12.1",
|
|
12
12
|
"decorator>=5.2.1",
|
|
13
13
|
"deepagents>=0.5.0a2",
|
|
14
14
|
"elasticsearch>=9.3.0",
|
|
15
|
-
"fastapi>=0.135.
|
|
15
|
+
"fastapi>=0.135.3",
|
|
16
16
|
"jinja2>=3.1.6",
|
|
17
17
|
"kafka-python>=2.3.0",
|
|
18
|
-
"langchain>=1.2.
|
|
19
|
-
"langchain-core>=1.2.
|
|
18
|
+
"langchain>=1.2.14",
|
|
19
|
+
"langchain-core>=1.2.25",
|
|
20
20
|
"langchain-openai>=1.1.11",
|
|
21
|
-
"langfuse>=4.0.
|
|
22
|
-
"langgraph>=1.1.
|
|
21
|
+
"langfuse>=4.0.6",
|
|
22
|
+
"langgraph>=1.1.4",
|
|
23
23
|
"langgraph-checkpoint-redis>=0.4.0",
|
|
24
24
|
"ldap3>=2.9.1",
|
|
25
25
|
"loguru>=0.7.3",
|
|
26
26
|
"mysql-connector-python>=9.6.0",
|
|
27
|
-
"nacos-sdk-python>=2.0.
|
|
27
|
+
"nacos-sdk-python>=2.0.11,<3.0",
|
|
28
28
|
"psutil>=7.2.2",
|
|
29
29
|
"pyxxl>=0.4.6",
|
|
30
30
|
"pydantic>=2.12.5",
|
|
@@ -32,7 +32,7 @@ dependencies = [
|
|
|
32
32
|
"python-multipart>=0.0.22",
|
|
33
33
|
"pyyaml>=6.0.3",
|
|
34
34
|
"redis>=7.3.0",
|
|
35
|
-
"sentry-sdk[fastapi]>=2.
|
|
35
|
+
"sentry-sdk[fastapi]>=2.57.0",
|
|
36
36
|
"sqlalchemy[asyncio]>=2.0.48",
|
|
37
37
|
"starlette[full]>=1.0.0",
|
|
38
38
|
"tiktoken>=0.12.0",
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
Usage:
|
|
5
5
|
sycli init [--project-name NAME] [--force]
|
|
6
6
|
sycli run "task description" [--max-rounds N]
|
|
7
|
+
sycli chat "task description" [--max-rounds N] [--mode optimize|create]
|
|
7
8
|
sycli create "description" [--data DIR] [--test FILE]
|
|
8
9
|
sycli resume [--project-root DIR]
|
|
9
10
|
sycli status [--project-root DIR]
|
|
@@ -60,6 +61,17 @@ def _create_parser() -> argparse.ArgumentParser:
|
|
|
60
61
|
p_create.add_argument("--template", choices=["web", "agent", "cli"], help="Project template")
|
|
61
62
|
p_create.add_argument("--project-root", "-r", default=".", help="Output directory")
|
|
62
63
|
|
|
64
|
+
# ── chat ──
|
|
65
|
+
p_chat = sub.add_parser("chat", help="Interactive conversational RL loop")
|
|
66
|
+
p_chat.add_argument("task", help="Task description")
|
|
67
|
+
p_chat.add_argument("--project-root", "-r", default=".", help="Project root directory")
|
|
68
|
+
p_chat.add_argument("--project-name", "-n", help="Project name override")
|
|
69
|
+
p_chat.add_argument("--max-rounds", "-m", type=int, help="Override max rounds")
|
|
70
|
+
p_chat.add_argument("--mode", choices=["optimize", "create"], default="optimize", help="Run mode")
|
|
71
|
+
p_chat.add_argument("--data", "-d", help="Path to datasets directory (create mode)")
|
|
72
|
+
p_chat.add_argument("--test", "-t", help="Path to test cases JSON (create mode)")
|
|
73
|
+
p_chat.add_argument("--template", choices=["web", "agent", "cli"], help="Project template (create mode)")
|
|
74
|
+
|
|
63
75
|
# ── resume ──
|
|
64
76
|
p_resume = sub.add_parser("resume", help="Resume interrupted optimization")
|
|
65
77
|
p_resume.add_argument("--project-root", "-r", default=".", help="Project root directory")
|
|
@@ -124,6 +136,10 @@ def main() -> None:
|
|
|
124
136
|
from sycli.commands.run_cmd import handle_run
|
|
125
137
|
sys.exit(handle_run(args))
|
|
126
138
|
|
|
139
|
+
elif args.command == "chat":
|
|
140
|
+
from sycli.commands.chat_cmd import handle_chat
|
|
141
|
+
sys.exit(handle_chat(args))
|
|
142
|
+
|
|
127
143
|
elif args.command == "create":
|
|
128
144
|
from sycli.commands.create_cmd import handle_create
|
|
129
145
|
sys.exit(handle_create(args))
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
"""sycli chat command - interactive conversational RL loop.
|
|
2
|
+
|
|
3
|
+
Runs the same RL optimization loop as `sycli run` or `sycli create`, but
|
|
4
|
+
pauses between rounds for user interaction. The user can:
|
|
5
|
+
- continue / Enter → proceed to next round
|
|
6
|
+
- stop → stop the loop
|
|
7
|
+
- hint <text> → inject a hint into the next round
|
|
8
|
+
- skip → skip the next round
|
|
9
|
+
- status → display current round / score info
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from __future__ import annotations
|
|
13
|
+
|
|
14
|
+
import asyncio
|
|
15
|
+
import signal
|
|
16
|
+
import sys
|
|
17
|
+
from pathlib import Path
|
|
18
|
+
|
|
19
|
+
from sycli.core.backend import create_backend
|
|
20
|
+
from sycli.core.display import (
|
|
21
|
+
chat_banner,
|
|
22
|
+
error,
|
|
23
|
+
header,
|
|
24
|
+
info,
|
|
25
|
+
success,
|
|
26
|
+
user_prompt,
|
|
27
|
+
warning,
|
|
28
|
+
)
|
|
29
|
+
from sycli.core.llm import create_llm
|
|
30
|
+
from sycli.models.config_models import SycliConfig
|
|
31
|
+
from sycli.rl.engine import RLEngine
|
|
32
|
+
|
|
33
|
+
# ── Graceful shutdown ──
|
|
34
|
+
|
|
35
|
+
_shutdown_requested = False
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def _signal_handler(sig, frame):
|
|
39
|
+
global _shutdown_requested
|
|
40
|
+
if _shutdown_requested:
|
|
41
|
+
warning("\nForce quit.")
|
|
42
|
+
sys.exit(1)
|
|
43
|
+
_shutdown_requested = True
|
|
44
|
+
warning("\nGraceful shutdown requested. Finishing current round...")
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
# ── Interactive callback ──
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def _make_round_callback() -> tuple[callable, list[str]]:
|
|
51
|
+
"""Return an (on_round_end callback, accumulated_hints) pair.
|
|
52
|
+
|
|
53
|
+
The callback is called by the engine after each round. It prints a
|
|
54
|
+
summary, shows the `sycli >` prompt, and waits for user input.
|
|
55
|
+
"""
|
|
56
|
+
pending_hints: list[str] = []
|
|
57
|
+
|
|
58
|
+
def on_round_end(summary: dict) -> str | None:
|
|
59
|
+
global _shutdown_requested
|
|
60
|
+
if _shutdown_requested:
|
|
61
|
+
return "__stop__"
|
|
62
|
+
|
|
63
|
+
round_num = summary["round"]
|
|
64
|
+
score = summary["score"]
|
|
65
|
+
prev_score = summary["prev_score"]
|
|
66
|
+
best = summary["best_score"]
|
|
67
|
+
passed = summary["tests_passed"]
|
|
68
|
+
total = summary["tests_total"]
|
|
69
|
+
decision = summary["decision"]
|
|
70
|
+
|
|
71
|
+
delta = score - prev_score
|
|
72
|
+
info(
|
|
73
|
+
f"Round {round_num} done: {passed}/{total} passed, "
|
|
74
|
+
f"score={score:.3f} ({delta:+.3f}), best={best:.3f} [{decision}]"
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
# Show prompt and loop until user says continue / stop
|
|
78
|
+
while True:
|
|
79
|
+
cmd = user_prompt()
|
|
80
|
+
|
|
81
|
+
if not cmd or cmd == "continue":
|
|
82
|
+
# Return any pending hints
|
|
83
|
+
if pending_hints:
|
|
84
|
+
hint = " ".join(pending_hints)
|
|
85
|
+
pending_hints.clear()
|
|
86
|
+
return hint
|
|
87
|
+
return None
|
|
88
|
+
|
|
89
|
+
if cmd == "stop":
|
|
90
|
+
return "__stop__"
|
|
91
|
+
|
|
92
|
+
if cmd == "skip":
|
|
93
|
+
# Skip: just continue without injecting anything
|
|
94
|
+
pending_hints.clear()
|
|
95
|
+
return None
|
|
96
|
+
|
|
97
|
+
if cmd == "status":
|
|
98
|
+
info(f" Round: {round_num}/{summary['max_rounds']}")
|
|
99
|
+
info(f" Score: {score:.3f} (best: {best:.3f})")
|
|
100
|
+
info(f" Tests: {passed}/{total}")
|
|
101
|
+
info(f" Decision: {decision}")
|
|
102
|
+
continue
|
|
103
|
+
|
|
104
|
+
if cmd.startswith("hint "):
|
|
105
|
+
hint_text = cmd[5:].strip()
|
|
106
|
+
if hint_text:
|
|
107
|
+
pending_hints.append(hint_text)
|
|
108
|
+
success(f"Hint recorded: {hint_text}")
|
|
109
|
+
continue
|
|
110
|
+
|
|
111
|
+
warning(
|
|
112
|
+
f"Unknown command: {cmd}. "
|
|
113
|
+
"Use: continue | stop | hint <text> | skip | status"
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
return on_round_end, pending_hints
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
# ── Command handler ──
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def handle_chat(args) -> int:
|
|
123
|
+
"""Handle `sycli chat` command."""
|
|
124
|
+
project_root = Path(args.project_root or ".").resolve()
|
|
125
|
+
sycli_dir = project_root / ".sycli"
|
|
126
|
+
config_path = sycli_dir / "sycli.json"
|
|
127
|
+
|
|
128
|
+
mode = getattr(args, "mode", "optimize") or "optimize"
|
|
129
|
+
|
|
130
|
+
# Auto-init if needed (for create-mode first run)
|
|
131
|
+
if not sycli_dir.exists() or not config_path.exists():
|
|
132
|
+
if mode == "create":
|
|
133
|
+
info("Initializing .sycli/ for CREATE mode...")
|
|
134
|
+
from sycli.commands.init_cmd import handle_init
|
|
135
|
+
import argparse
|
|
136
|
+
init_args = argparse.Namespace(
|
|
137
|
+
project_root=str(project_root),
|
|
138
|
+
project_name=project_root.name,
|
|
139
|
+
force=False,
|
|
140
|
+
)
|
|
141
|
+
handle_init(init_args)
|
|
142
|
+
success(".sycli/ initialized")
|
|
143
|
+
else:
|
|
144
|
+
error(".sycli/ not found. Run `sycli init` first.")
|
|
145
|
+
return 1
|
|
146
|
+
|
|
147
|
+
# Load config
|
|
148
|
+
config = SycliConfig.load(config_path)
|
|
149
|
+
config.project_root = str(project_root)
|
|
150
|
+
|
|
151
|
+
issues = config.validate_config()
|
|
152
|
+
if issues:
|
|
153
|
+
for issue in issues:
|
|
154
|
+
warning(issue)
|
|
155
|
+
error("Configuration issues found. Fix .sycli/sycli.json or set env vars.")
|
|
156
|
+
return 1
|
|
157
|
+
|
|
158
|
+
# Get task
|
|
159
|
+
task = getattr(args, "task", None)
|
|
160
|
+
if not task:
|
|
161
|
+
if mode == "create":
|
|
162
|
+
task = getattr(args, "description", "")
|
|
163
|
+
if not task:
|
|
164
|
+
error("Task description required. Usage: sycli chat \"your task\"")
|
|
165
|
+
return 1
|
|
166
|
+
|
|
167
|
+
project_name = args.project_name or project_root.name
|
|
168
|
+
|
|
169
|
+
# Initialize components
|
|
170
|
+
try:
|
|
171
|
+
llm = create_llm(config.llm, streaming=True)
|
|
172
|
+
except Exception as e:
|
|
173
|
+
error(f"Failed to initialize LLM: {e}")
|
|
174
|
+
return 1
|
|
175
|
+
|
|
176
|
+
try:
|
|
177
|
+
backend = create_backend(project_root)
|
|
178
|
+
except Exception as e:
|
|
179
|
+
error(f"Failed to create backend: {e}")
|
|
180
|
+
return 1
|
|
181
|
+
|
|
182
|
+
chat_banner()
|
|
183
|
+
|
|
184
|
+
if mode == "create":
|
|
185
|
+
return _chat_create(args, config, llm, backend, sycli_dir, project_root, project_name, task)
|
|
186
|
+
else:
|
|
187
|
+
return _chat_optimize(args, config, llm, backend, sycli_dir, project_root, project_name, task)
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
def _chat_optimize(args, config, llm, backend, sycli_dir, project_root, project_name, task) -> int:
|
|
191
|
+
"""Chat mode for OPTIMIZE."""
|
|
192
|
+
engine = RLEngine(
|
|
193
|
+
config=config,
|
|
194
|
+
llm=llm,
|
|
195
|
+
backend=backend,
|
|
196
|
+
project_name=project_name,
|
|
197
|
+
sycli_dir=sycli_dir,
|
|
198
|
+
)
|
|
199
|
+
|
|
200
|
+
max_rounds = getattr(args, "max_rounds", None) or config.rl.max_rounds
|
|
201
|
+
on_round_end, _ = _make_round_callback()
|
|
202
|
+
|
|
203
|
+
global _shutdown_requested
|
|
204
|
+
_shutdown_requested = False
|
|
205
|
+
signal.signal(signal.SIGINT, _signal_handler)
|
|
206
|
+
|
|
207
|
+
try:
|
|
208
|
+
state = asyncio.run(
|
|
209
|
+
engine.run_loop(
|
|
210
|
+
task_description=task,
|
|
211
|
+
mode="optimize",
|
|
212
|
+
max_rounds=max_rounds,
|
|
213
|
+
on_round_end=on_round_end,
|
|
214
|
+
)
|
|
215
|
+
)
|
|
216
|
+
except KeyboardInterrupt:
|
|
217
|
+
warning("\nInterrupted. State saved. Run `sycli resume` to continue.")
|
|
218
|
+
return 0
|
|
219
|
+
except Exception as e:
|
|
220
|
+
error(f"RL loop failed: {e}")
|
|
221
|
+
import traceback
|
|
222
|
+
traceback.print_exc()
|
|
223
|
+
return 1
|
|
224
|
+
|
|
225
|
+
_print_final_status(state)
|
|
226
|
+
return 0
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
def _chat_create(args, config, llm, backend, sycli_dir, project_root, project_name, task) -> int:
|
|
230
|
+
"""Chat mode for CREATE."""
|
|
231
|
+
from sycli.mode.create import run_create
|
|
232
|
+
|
|
233
|
+
data_dir = Path(args.data).resolve() if getattr(args, "data", None) else None
|
|
234
|
+
test_file = Path(args.test).resolve() if getattr(args, "test", None) else None
|
|
235
|
+
template = getattr(args, "template", None)
|
|
236
|
+
|
|
237
|
+
# CREATE mode doesn't use on_round_end directly (it has its own loop),
|
|
238
|
+
# so we run it normally but still register signal handling.
|
|
239
|
+
global _shutdown_requested
|
|
240
|
+
_shutdown_requested = False
|
|
241
|
+
signal.signal(signal.SIGINT, _signal_handler)
|
|
242
|
+
|
|
243
|
+
try:
|
|
244
|
+
state = asyncio.run(
|
|
245
|
+
run_create(
|
|
246
|
+
config=config,
|
|
247
|
+
llm=llm,
|
|
248
|
+
backend=backend,
|
|
249
|
+
project_name=project_name,
|
|
250
|
+
sycli_dir=sycli_dir,
|
|
251
|
+
description=task,
|
|
252
|
+
data_dir=data_dir,
|
|
253
|
+
test_file=test_file,
|
|
254
|
+
template=template,
|
|
255
|
+
)
|
|
256
|
+
)
|
|
257
|
+
except KeyboardInterrupt:
|
|
258
|
+
warning("\nInterrupted. State saved. Run `sycli resume` to continue.")
|
|
259
|
+
return 0
|
|
260
|
+
except Exception as e:
|
|
261
|
+
error(f"CREATE mode failed: {e}")
|
|
262
|
+
import traceback
|
|
263
|
+
traceback.print_exc()
|
|
264
|
+
return 1
|
|
265
|
+
|
|
266
|
+
_print_final_status(state)
|
|
267
|
+
return 0
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
def _print_final_status(state: dict) -> None:
|
|
271
|
+
"""Print final status after chat session ends."""
|
|
272
|
+
status = state.get("status", "unknown")
|
|
273
|
+
if status == "user_stopped":
|
|
274
|
+
warning("Stopped by user.")
|
|
275
|
+
elif status == "target_reached":
|
|
276
|
+
success(f"Target accuracy reached! Score: {state['best_reward']:.3f}")
|
|
277
|
+
elif status == "converged":
|
|
278
|
+
success(f"Converged! Best score: {state['best_reward']:.3f}")
|
|
279
|
+
else:
|
|
280
|
+
warning(f"Session ended with status: {status}")
|
|
281
|
+
|
|
282
|
+
info(f"Total rounds: {state.get('current_round', 0)}, Best: {state.get('best_reward', 0):.3f}")
|
|
283
|
+
info("Run `sycli resume` to continue or `sycli history` to review rounds.")
|
{sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycli/commands/create_cmd.py
RENAMED
|
@@ -5,9 +5,9 @@ from __future__ import annotations
|
|
|
5
5
|
import asyncio
|
|
6
6
|
from pathlib import Path
|
|
7
7
|
|
|
8
|
-
from sycli.backend import create_backend
|
|
9
|
-
from sycli.display import error, header, info, success, warning
|
|
10
|
-
from sycli.llm import create_llm
|
|
8
|
+
from sycli.core.backend import create_backend
|
|
9
|
+
from sycli.core.display import error, header, info, success, warning
|
|
10
|
+
from sycli.core.llm import create_llm
|
|
11
11
|
from sycli.mode.create import run_create
|
|
12
12
|
from sycli.models.config_models import SycliConfig
|
|
13
13
|
|
{sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycli/commands/init_cmd.py
RENAMED
|
@@ -5,7 +5,7 @@ from __future__ import annotations
|
|
|
5
5
|
import json
|
|
6
6
|
from pathlib import Path
|
|
7
7
|
|
|
8
|
-
from sycli.display import error, info, success, warning
|
|
8
|
+
from sycli.core.display import error, info, success, warning
|
|
9
9
|
from sycli.models.config_models import SycliConfig
|
|
10
10
|
|
|
11
11
|
|
|
@@ -14,18 +14,21 @@ def _default_sycli_json() -> dict:
|
|
|
14
14
|
return {
|
|
15
15
|
"version": "1.0",
|
|
16
16
|
"llm": {
|
|
17
|
-
"model": "
|
|
17
|
+
"model": "glm-5.1",
|
|
18
18
|
"provider": "openai",
|
|
19
|
-
"
|
|
20
|
-
"
|
|
19
|
+
"base_url": "http://10.10.6.132:3000",
|
|
20
|
+
"base_url_env": "",
|
|
21
|
+
"api_key": "sk-3hXhO7uCG5CRi7t3THE2cWTKVJqesXJ38cKstHZhDVXHQOIn",
|
|
22
|
+
"api_key_env": "",
|
|
21
23
|
"temperature": 0.7,
|
|
22
|
-
"max_tokens":
|
|
24
|
+
"max_tokens": 200000,
|
|
23
25
|
"timeout": 180,
|
|
24
|
-
"thinking":
|
|
26
|
+
"thinking": True,
|
|
25
27
|
},
|
|
26
28
|
"rl": {
|
|
27
29
|
"max_rounds": 100,
|
|
28
30
|
"min_rounds": 5,
|
|
31
|
+
"target_accuracy": 0.95,
|
|
29
32
|
"convergence_threshold": 0.05,
|
|
30
33
|
"convergence_window_size": 10,
|
|
31
34
|
"regression_penalty_weight": 0.3,
|
|
@@ -38,10 +41,11 @@ def _default_sycli_json() -> dict:
|
|
|
38
41
|
"exploration_epsilon_decay": 0.95,
|
|
39
42
|
},
|
|
40
43
|
"memory": {
|
|
41
|
-
"hot_token_budget":
|
|
42
|
-
"warm_token_budget":
|
|
43
|
-
"compress_every_n_rounds":
|
|
44
|
-
"deep_compress_every_n_rounds":
|
|
44
|
+
"hot_token_budget": 16000,
|
|
45
|
+
"warm_token_budget": 40000,
|
|
46
|
+
"compress_every_n_rounds": 8,
|
|
47
|
+
"deep_compress_every_n_rounds": 30,
|
|
48
|
+
"compress_threshold": 0.8,
|
|
45
49
|
},
|
|
46
50
|
"guardrails": {
|
|
47
51
|
"max_file_changes_per_step": 10,
|
{sycommon_python_lib-0.2.1a45 → sycommon_python_lib-0.2.1a46}/src/sycli/commands/resume_cmd.py
RENAMED
|
@@ -6,9 +6,9 @@ import asyncio
|
|
|
6
6
|
import json
|
|
7
7
|
from pathlib import Path
|
|
8
8
|
|
|
9
|
-
from sycli.backend import create_backend
|
|
10
|
-
from sycli.display import error, header, info, success, warning
|
|
11
|
-
from sycli.llm import create_llm
|
|
9
|
+
from sycli.core.backend import create_backend
|
|
10
|
+
from sycli.core.display import error, header, info, success, warning
|
|
11
|
+
from sycli.core.llm import create_llm
|
|
12
12
|
from sycli.models.config_models import SycliConfig
|
|
13
13
|
from sycli.mode.create import run_create
|
|
14
14
|
from sycli.mode.optimize import run_optimize
|
|
@@ -8,9 +8,9 @@ import signal
|
|
|
8
8
|
import sys
|
|
9
9
|
from pathlib import Path
|
|
10
10
|
|
|
11
|
-
from sycli.backend import create_backend
|
|
12
|
-
from sycli.display import error, header, info, success, warning
|
|
13
|
-
from sycli.llm import create_llm
|
|
11
|
+
from sycli.core.backend import create_backend
|
|
12
|
+
from sycli.core.display import error, header, info, success, warning
|
|
13
|
+
from sycli.core.llm import create_llm
|
|
14
14
|
from sycli.models.config_models import SycliConfig
|
|
15
15
|
from sycli.rl.engine import RLEngine
|
|
16
16
|
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"""Core __init__.py - re-exports for backward compatibility."""
|
|
2
|
+
|
|
3
|
+
from sycli.core.backend import create_backend
|
|
4
|
+
from sycli.core.display import Colors, error, header, info, success, warning
|
|
5
|
+
from sycli.core.git_integration import (
|
|
6
|
+
git_checkpoint,
|
|
7
|
+
git_current_branch,
|
|
8
|
+
git_has_changes,
|
|
9
|
+
git_is_repo,
|
|
10
|
+
git_rollback,
|
|
11
|
+
)
|
|
12
|
+
from sycli.core.llm import create_llm
|
|
13
|
+
from sycli.core.state import load_state, save_state
|
|
14
|
+
|
|
15
|
+
__all__ = [
|
|
16
|
+
"Colors",
|
|
17
|
+
"create_backend",
|
|
18
|
+
"create_llm",
|
|
19
|
+
"error",
|
|
20
|
+
"git_checkpoint",
|
|
21
|
+
"git_current_branch",
|
|
22
|
+
"git_has_changes",
|
|
23
|
+
"git_is_repo",
|
|
24
|
+
"git_rollback",
|
|
25
|
+
"header",
|
|
26
|
+
"info",
|
|
27
|
+
"load_state",
|
|
28
|
+
"save_state",
|
|
29
|
+
"success",
|
|
30
|
+
"warning",
|
|
31
|
+
]
|
{sycommon_python_lib-0.2.1a45/src/sycli → sycommon_python_lib-0.2.1a46/src/sycli/core}/display.py
RENAMED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"""Terminal display utilities with color support."""
|
|
2
2
|
|
|
3
3
|
import sys
|
|
4
|
+
import threading
|
|
4
5
|
|
|
5
6
|
|
|
6
7
|
class Colors:
|
|
@@ -11,6 +12,7 @@ class Colors:
|
|
|
11
12
|
CYAN = "\033[36m"
|
|
12
13
|
BOLD = "\033[1m"
|
|
13
14
|
DIM = "\033[2m"
|
|
15
|
+
MAGENTA = "\033[35m"
|
|
14
16
|
|
|
15
17
|
|
|
16
18
|
def info(msg: str) -> None:
|
|
@@ -62,3 +64,33 @@ def final_report(
|
|
|
62
64
|
print(f" Best round: {best_round} (score: {best_score:.3f})")
|
|
63
65
|
print(f" Best strategy: {strategy}")
|
|
64
66
|
print(f"{Colors.BOLD}{Colors.GREEN}{'═' * 50}{Colors.RESET}\n")
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def agent_thinking(agent_name: str) -> None:
|
|
70
|
+
"""Print a thinking indicator for an agent."""
|
|
71
|
+
print(f"{Colors.DIM} ⋯ {agent_name} is thinking...{Colors.RESET}", end="", flush=True)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def agent_done(agent_name: str) -> None:
|
|
75
|
+
"""Clear the thinking indicator and print done."""
|
|
76
|
+
print(f"\r{Colors.GREEN} ✔ {agent_name} done. {Colors.RESET}")
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def user_prompt() -> str:
|
|
80
|
+
"""Display the interactive prompt and get user input."""
|
|
81
|
+
print(f"\n{Colors.MAGENTA}{Colors.BOLD}sycli > {Colors.RESET}", end="", flush=True)
|
|
82
|
+
try:
|
|
83
|
+
return input().strip()
|
|
84
|
+
except EOFError:
|
|
85
|
+
return "continue"
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def chat_banner() -> None:
|
|
89
|
+
"""Print the chat mode banner."""
|
|
90
|
+
print(f"\n{Colors.BOLD}{Colors.CYAN}── Interactive Mode ──{Colors.RESET}")
|
|
91
|
+
print(f" Commands: {Colors.BOLD}continue{Colors.RESET} | {Colors.BOLD}stop{Colors.RESET} | {Colors.BOLD}hint <text>{Colors.RESET} | {Colors.BOLD}skip{Colors.RESET} | {Colors.BOLD}status{Colors.RESET}")
|
|
92
|
+
print(f" Press Enter to continue to next round\n")
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
# Lock for thread-safe printing
|
|
96
|
+
_print_lock = threading.Lock()
|