sycommon-python-lib 0.2.5a4__py3-none-any.whl → 0.2.5a5__py3-none-any.whl

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.
Files changed (267) hide show
  1. command/__init__.py +28 -28
  2. command/cli.py +457 -457
  3. command/core/__init__.py +19 -19
  4. command/core/console.py +36 -36
  5. command/core/models.py +78 -78
  6. command/core/project.py +310 -310
  7. command/core/utils.py +31 -31
  8. command/templates/__init__.py +1 -1
  9. command/templates/agent/README.md.tpl +88 -88
  10. command/templates/agent/__init__.py +1 -1
  11. command/templates/agent/agent/__init__.py.tpl +6 -6
  12. command/templates/agent/agent/main_agent.py.tpl +51 -51
  13. command/templates/agent/agent/nodes/__init__.py.tpl +6 -6
  14. command/templates/agent/agent/nodes/example_node.py.tpl +33 -33
  15. command/templates/agent/agent/states/__init__.py.tpl +6 -6
  16. command/templates/agent/agent/states/agent_state.py.tpl +30 -30
  17. command/templates/agent/api/__init__.py.tpl +3 -3
  18. command/templates/agent/api/query.py.tpl +30 -30
  19. command/templates/agent/api/sse/__init__.py.tpl +6 -6
  20. command/templates/agent/api/sse/agent.py.tpl +30 -30
  21. command/templates/agent/app.py.tpl +95 -95
  22. command/templates/agent/client/__init__.py.tpl +3 -3
  23. command/templates/agent/db/__init__.py.tpl +8 -8
  24. command/templates/agent/db/model/__init__.py.tpl +8 -8
  25. command/templates/agent/db/model/entity.py.tpl +24 -24
  26. command/templates/agent/db/service.py.tpl +37 -37
  27. command/templates/agent/model/__init__.py.tpl +3 -3
  28. command/templates/agent/model/parse.py.tpl +22 -22
  29. command/templates/agent/tools/__init__.py.tpl +3 -3
  30. command/templates/agent/tools/mq.py.tpl +66 -66
  31. command/templates/base/.env.tpl +9 -9
  32. command/templates/base/.gitignore.tpl +38 -38
  33. command/templates/base/Dockerfile.tpl +19 -19
  34. command/templates/base/README.md.tpl +62 -62
  35. command/templates/base/__init__.py +1 -1
  36. command/templates/base/app.py.tpl +66 -66
  37. command/templates/base/app.yaml.tpl +29 -29
  38. command/templates/base/client/FileServiceClient.py.tpl +15 -15
  39. command/templates/base/model/file_info.py.tpl +14 -14
  40. command/templates/base/requirements.txt.tpl +32 -32
  41. command/templates/cli/README.md.tpl +54 -54
  42. command/templates/cli/__init__.py +1 -1
  43. command/templates/cli/app.py.tpl +45 -45
  44. command/templates/cli/commands/__init__.py.tpl +1 -1
  45. command/templates/cli/commands/hello.py.tpl +6 -6
  46. command/templates/cli/pyproject.toml.tpl +14 -14
  47. command/templates/cli/tools/__init__.py.tpl +3 -3
  48. command/templates/web/README.md.tpl +80 -80
  49. command/templates/web/__init__.py +1 -1
  50. command/templates/web/api/__init__.py.tpl +6 -6
  51. command/templates/web/api/echo.py.tpl +28 -28
  52. command/templates/web/api/sse/__init__.py.tpl +8 -8
  53. command/templates/web/api/sse/echo.py.tpl +37 -37
  54. command/templates/web/app.py.tpl +99 -99
  55. command/templates/web/client/__init__.py.tpl +3 -3
  56. command/templates/web/model/__init__.py.tpl +3 -3
  57. command/templates/web/tools/__init__.py.tpl +3 -3
  58. command/templates/web/tools/mq.py.tpl +29 -29
  59. nexus/__init__.py +40 -40
  60. sycli/__init__.py +3 -3
  61. sycli/__main__.py +6 -6
  62. sycli/agents/__init__.py +1 -1
  63. sycli/agents/factory.py +245 -245
  64. sycli/agents/prompts.py +469 -469
  65. sycli/cdp/__init__.py +1 -1
  66. sycli/cdp/browser.py +214 -214
  67. sycli/cdp/capabilities/__init__.py +1 -1
  68. sycli/cdp/capabilities/console.py +85 -85
  69. sycli/cdp/capabilities/dom.py +53 -53
  70. sycli/cdp/capabilities/network.py +119 -119
  71. sycli/cdp/capabilities/page_errors.py +91 -91
  72. sycli/cdp/capabilities/performance.py +67 -67
  73. sycli/cdp/capabilities/screenshot.py +61 -61
  74. sycli/cdp/client.py +148 -148
  75. sycli/cdp/protocol.py +133 -133
  76. sycli/cdp/repl.py +267 -267
  77. sycli/cli.py +558 -558
  78. sycli/commands/__init__.py +1 -1
  79. sycli/commands/cdp_cmd.py +271 -271
  80. sycli/commands/chat_cmd.py +283 -283
  81. sycli/commands/create_cmd.py +122 -122
  82. sycli/commands/evaluate_cmd.py +180 -180
  83. sycli/commands/init_cmd.py +164 -164
  84. sycli/commands/memory_cmd.py +168 -168
  85. sycli/commands/resume_cmd.py +234 -234
  86. sycli/commands/rollback_cmd.py +52 -52
  87. sycli/commands/run_cmd.py +112 -112
  88. sycli/core/__init__.py +31 -31
  89. sycli/core/backend.py +36 -36
  90. sycli/core/config.py +4 -4
  91. sycli/core/display.py +96 -96
  92. sycli/core/git_integration.py +198 -198
  93. sycli/core/llm.py +63 -63
  94. sycli/core/state.py +40 -40
  95. sycli/evaluate/__init__.py +1 -1
  96. sycli/evaluate/api_evaluator.py +696 -696
  97. sycli/memory/__init__.py +1 -1
  98. sycli/memory/compressor.py +134 -134
  99. sycli/memory/full.py +74 -74
  100. sycli/memory/hot.py +92 -92
  101. sycli/memory/manager.py +253 -253
  102. sycli/memory/warm.py +85 -85
  103. sycli/mode/__init__.py +1 -1
  104. sycli/mode/create.py +501 -501
  105. sycli/mode/optimize.py +40 -40
  106. sycli/models/__init__.py +1 -1
  107. sycli/models/config_models.py +212 -212
  108. sycli/rl/__init__.py +1 -1
  109. sycli/rl/baseline_tests.py +245 -245
  110. sycli/rl/checkpoint.py +497 -497
  111. sycli/rl/convergence.py +226 -226
  112. sycli/rl/diagnosis.py +195 -195
  113. sycli/rl/engine.py +1792 -1792
  114. sycli/rl/environment.py +489 -489
  115. sycli/rl/experience.py +230 -230
  116. sycli/rl/harness_prompts.py +93 -93
  117. sycli/rl/history.py +136 -136
  118. sycli/rl/optimization_logger.py +264 -264
  119. sycli/rl/pre_validation.py +106 -106
  120. sycli/rl/reward.py +132 -132
  121. sycli/rl/strategy_bandit.py +291 -291
  122. sycli/rl/strategy_generator.py +218 -218
  123. sycli/rl/strategy_prompts.py +97 -97
  124. sycli/skills/__init__.py +5 -5
  125. sycommon/agent/__init__.py +176 -176
  126. sycommon/agent/agent_manager.py +445 -445
  127. sycommon/agent/chat_events.py +447 -447
  128. sycommon/agent/deep_agent.py +752 -752
  129. sycommon/agent/mcp/__init__.py +30 -30
  130. sycommon/agent/mcp/models.py +56 -56
  131. sycommon/agent/mcp/tool_loader.py +224 -224
  132. sycommon/agent/multi_agent_team.py +723 -723
  133. sycommon/agent/sandbox/__init__.py +103 -103
  134. sycommon/agent/sandbox/file_ops.py +632 -632
  135. sycommon/agent/sandbox/http_sandbox_backend.py +1355 -1355
  136. sycommon/agent/sandbox/minio_sync.py +513 -513
  137. sycommon/agent/sandbox/sandbox_pool.py +267 -267
  138. sycommon/agent/sandbox/sandbox_recovery.py +201 -201
  139. sycommon/agent/sandbox/session.py +82 -82
  140. sycommon/agent/summarization_utils.py +192 -192
  141. sycommon/auth/__init__.py +69 -69
  142. sycommon/auth/ldap_service.py +340 -340
  143. sycommon/auth/oa_cache.py +95 -95
  144. sycommon/auth/oa_crypto.py +60 -60
  145. sycommon/auth/oa_service.py +201 -201
  146. sycommon/auth/wecom_ldap_service.py +490 -490
  147. sycommon/config/Config.py +175 -175
  148. sycommon/config/DatabaseConfig.py +34 -34
  149. sycommon/config/ElasticsearchConfig.py +65 -65
  150. sycommon/config/EmbeddingConfig.py +15 -15
  151. sycommon/config/LLMConfig.py +20 -20
  152. sycommon/config/LangfuseConfig.py +15 -15
  153. sycommon/config/MQConfig.py +15 -15
  154. sycommon/config/PgConfig.py +54 -54
  155. sycommon/config/RedisConfig.py +150 -150
  156. sycommon/config/RerankerConfig.py +14 -14
  157. sycommon/config/SentryConfig.py +13 -13
  158. sycommon/config/XxlJobConfig.py +17 -17
  159. sycommon/database/async_base_db_service.py +36 -36
  160. sycommon/database/async_database_service.py +115 -115
  161. sycommon/database/base_db_service.py +30 -30
  162. sycommon/database/database_service.py +98 -98
  163. sycommon/database/elasticsearch_service.py +104 -104
  164. sycommon/database/pg_checkpoint_service.py +132 -132
  165. sycommon/database/redis_service.py +767 -767
  166. sycommon/database/token_usage_db_service.py +181 -181
  167. sycommon/health/health_check.py +17 -17
  168. sycommon/health/metrics.py +13 -13
  169. sycommon/health/ping.py +13 -13
  170. sycommon/heartbeat_process/__init__.py +67 -67
  171. sycommon/heartbeat_process/heartbeat_config.py +137 -137
  172. sycommon/heartbeat_process/heartbeat_process_manager.py +299 -299
  173. sycommon/heartbeat_process/heartbeat_process_worker.py +466 -466
  174. sycommon/llm/embedding.py +455 -455
  175. sycommon/llm/get_llm.py +193 -193
  176. sycommon/llm/llm_logger.py +77 -77
  177. sycommon/llm/llm_tokens.py +127 -127
  178. sycommon/llm/llm_with_token_tracking.py +259 -259
  179. sycommon/llm/native_with_fallback_runnable.py +201 -201
  180. sycommon/llm/output_fixing_runnable.py +216 -216
  181. sycommon/llm/struct_token.py +500 -486
  182. sycommon/llm/sy_langfuse.py +120 -120
  183. sycommon/llm/token_usage_es_service.py +539 -539
  184. sycommon/llm/token_usage_mysql_service.py +818 -818
  185. sycommon/llm/usage_token.py +186 -186
  186. sycommon/logging/async_sql_logger.py +65 -65
  187. sycommon/logging/kafka_log.py +339 -339
  188. sycommon/logging/logger_levels.py +23 -23
  189. sycommon/logging/logger_wrapper.py +25 -25
  190. sycommon/logging/process_logger.py +177 -177
  191. sycommon/logging/sql_logger.py +53 -53
  192. sycommon/middleware/background_execution.py +568 -568
  193. sycommon/middleware/context.py +5 -5
  194. sycommon/middleware/cors.py +16 -16
  195. sycommon/middleware/docs.py +30 -30
  196. sycommon/middleware/exception.py +79 -79
  197. sycommon/middleware/middleware.py +51 -51
  198. sycommon/middleware/monitor_memory.py +22 -22
  199. sycommon/middleware/mq.py +8 -8
  200. sycommon/middleware/sandbox.py +1713 -1713
  201. sycommon/middleware/timeout.py +44 -44
  202. sycommon/middleware/token_tracking.py +173 -173
  203. sycommon/middleware/tool_result_truncation.py +273 -273
  204. sycommon/middleware/traceid.py +312 -312
  205. sycommon/models/base_http.py +101 -101
  206. sycommon/models/log.py +30 -30
  207. sycommon/models/mqlistener_config.py +39 -39
  208. sycommon/models/mqmsg_model.py +11 -11
  209. sycommon/models/mqsend_config.py +8 -8
  210. sycommon/models/sandbox.py +341 -341
  211. sycommon/models/sso_user.py +66 -66
  212. sycommon/models/token_usage.py +25 -25
  213. sycommon/models/token_usage_mysql.py +59 -59
  214. sycommon/models/xxljob_handler_config.py +11 -11
  215. sycommon/notice/__init__.py +5 -5
  216. sycommon/notice/uvicorn_monitor.py +346 -346
  217. sycommon/notice/wecom_message.py +328 -328
  218. sycommon/rabbitmq/process_pool_consumer.py +850 -850
  219. sycommon/rabbitmq/rabbitmq_client.py +455 -455
  220. sycommon/rabbitmq/rabbitmq_pool.py +324 -324
  221. sycommon/rabbitmq/rabbitmq_service.py +242 -242
  222. sycommon/rabbitmq/rabbitmq_service_client_manager.py +252 -252
  223. sycommon/rabbitmq/rabbitmq_service_connection_monitor.py +108 -108
  224. sycommon/rabbitmq/rabbitmq_service_consumer_manager.py +243 -243
  225. sycommon/rabbitmq/rabbitmq_service_core.py +130 -130
  226. sycommon/rabbitmq/rabbitmq_service_producer_manager.py +231 -231
  227. sycommon/sentry/sy_sentry.py +35 -35
  228. sycommon/services.py +521 -521
  229. sycommon/sse/__init__.py +4 -4
  230. sycommon/sse/event.py +97 -97
  231. sycommon/sse/sse.py +289 -289
  232. sycommon/synacos/__init__.py +9 -9
  233. sycommon/synacos/example.py +248 -248
  234. sycommon/synacos/example2.py +227 -227
  235. sycommon/synacos/feign.py +313 -313
  236. sycommon/synacos/feign_client.py +435 -435
  237. sycommon/synacos/nacos_client_base.py +171 -171
  238. sycommon/synacos/nacos_config_manager.py +163 -163
  239. sycommon/synacos/nacos_heartbeat_manager.py +245 -245
  240. sycommon/synacos/nacos_service.py +286 -286
  241. sycommon/synacos/nacos_service_discovery.py +245 -245
  242. sycommon/synacos/nacos_service_registration.py +263 -263
  243. sycommon/synacos/param.py +75 -75
  244. sycommon/tests/deep_agent_server.py +535 -535
  245. sycommon/tests/test_deep_agent.py +160 -160
  246. sycommon/tests/test_email.py +172 -172
  247. sycommon/tests/test_minimax_reasoning.py +290 -290
  248. sycommon/tests/test_mq.py +128 -128
  249. sycommon/tests/test_oa_login.py +229 -229
  250. sycommon/tests/test_real_summarization.py +166 -166
  251. sycommon/tests/test_summarization_config.py +463 -463
  252. sycommon/tests/test_summarization_real.py +329 -329
  253. sycommon/tools/async_utils.py +26 -26
  254. sycommon/tools/docs.py +42 -42
  255. sycommon/tools/env.py +62 -62
  256. sycommon/tools/merge_headers.py +135 -135
  257. sycommon/tools/snowflake.py +263 -263
  258. sycommon/tools/syemail.py +173 -173
  259. sycommon/tools/timing.py +73 -73
  260. sycommon/xxljob/__init__.py +3 -3
  261. sycommon/xxljob/xxljob_service.py +196 -196
  262. {sycommon_python_lib-0.2.5a4.dist-info → sycommon_python_lib-0.2.5a5.dist-info}/METADATA +152 -152
  263. sycommon_python_lib-0.2.5a5.dist-info/RECORD +277 -0
  264. sycommon_python_lib-0.2.5a4.dist-info/RECORD +0 -277
  265. {sycommon_python_lib-0.2.5a4.dist-info → sycommon_python_lib-0.2.5a5.dist-info}/WHEEL +0 -0
  266. {sycommon_python_lib-0.2.5a4.dist-info → sycommon_python_lib-0.2.5a5.dist-info}/entry_points.txt +0 -0
  267. {sycommon_python_lib-0.2.5a4.dist-info → sycommon_python_lib-0.2.5a5.dist-info}/top_level.txt +0 -0
command/__init__.py CHANGED
@@ -1,28 +1,28 @@
1
- """
2
- sycommon CLI 工具集
3
- """
4
- from .cli import main
5
- from .core import (
6
- FeatureOptions,
7
- print_info,
8
- print_success,
9
- print_error,
10
- print_warning,
11
- Colors,
12
- get_all_files_in_directory,
13
- init_project,
14
- interactive_feature_selection,
15
- )
16
-
17
- __all__ = [
18
- "main",
19
- "FeatureOptions",
20
- "print_info",
21
- "print_success",
22
- "print_error",
23
- "print_warning",
24
- "Colors",
25
- "get_all_files_in_directory",
26
- "init_project",
27
- "interactive_feature_selection",
28
- ]
1
+ """
2
+ sycommon CLI 工具集
3
+ """
4
+ from .cli import main
5
+ from .core import (
6
+ FeatureOptions,
7
+ print_info,
8
+ print_success,
9
+ print_error,
10
+ print_warning,
11
+ Colors,
12
+ get_all_files_in_directory,
13
+ init_project,
14
+ interactive_feature_selection,
15
+ )
16
+
17
+ __all__ = [
18
+ "main",
19
+ "FeatureOptions",
20
+ "print_info",
21
+ "print_success",
22
+ "print_error",
23
+ "print_warning",
24
+ "Colors",
25
+ "get_all_files_in_directory",
26
+ "init_project",
27
+ "interactive_feature_selection",
28
+ ]