sycommon-python-lib 0.2.3a1__py3-none-any.whl → 0.2.3a2__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 (254) 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 +150 -150
  126. sycommon/agent/agent_manager.py +445 -445
  127. sycommon/agent/chat_events.py +447 -447
  128. sycommon/agent/deep_agent.py +728 -700
  129. sycommon/agent/multi_agent_team.py +717 -717
  130. sycommon/agent/sandbox/__init__.py +103 -103
  131. sycommon/agent/sandbox/file_ops.py +612 -604
  132. sycommon/agent/sandbox/http_sandbox_backend.py +1298 -1298
  133. sycommon/agent/sandbox/minio_sync.py +500 -500
  134. sycommon/agent/sandbox/sandbox_pool.py +267 -267
  135. sycommon/agent/sandbox/sandbox_recovery.py +200 -200
  136. sycommon/agent/sandbox/session.py +82 -82
  137. sycommon/agent/summarization_utils.py +68 -68
  138. sycommon/auth/__init__.py +46 -46
  139. sycommon/auth/ldap_service.py +340 -340
  140. sycommon/auth/wecom_ldap_service.py +490 -490
  141. sycommon/config/Config.py +175 -175
  142. sycommon/config/DatabaseConfig.py +34 -34
  143. sycommon/config/ElasticsearchConfig.py +65 -65
  144. sycommon/config/EmbeddingConfig.py +15 -15
  145. sycommon/config/LLMConfig.py +19 -19
  146. sycommon/config/LangfuseConfig.py +15 -15
  147. sycommon/config/MQConfig.py +15 -15
  148. sycommon/config/RedisConfig.py +150 -150
  149. sycommon/config/RerankerConfig.py +14 -14
  150. sycommon/config/SentryConfig.py +13 -13
  151. sycommon/config/XxlJobConfig.py +17 -17
  152. sycommon/database/async_base_db_service.py +36 -36
  153. sycommon/database/async_database_service.py +100 -100
  154. sycommon/database/base_db_service.py +30 -30
  155. sycommon/database/database_service.py +98 -98
  156. sycommon/database/elasticsearch_service.py +104 -104
  157. sycommon/database/redis_service.py +767 -767
  158. sycommon/database/token_usage_db_service.py +181 -181
  159. sycommon/health/health_check.py +17 -17
  160. sycommon/health/metrics.py +13 -13
  161. sycommon/health/ping.py +13 -13
  162. sycommon/heartbeat_process/__init__.py +67 -67
  163. sycommon/heartbeat_process/heartbeat_config.py +137 -137
  164. sycommon/heartbeat_process/heartbeat_process_manager.py +299 -299
  165. sycommon/heartbeat_process/heartbeat_process_worker.py +466 -466
  166. sycommon/llm/embedding.py +455 -455
  167. sycommon/llm/get_llm.py +189 -189
  168. sycommon/llm/llm_logger.py +77 -77
  169. sycommon/llm/llm_tokens.py +127 -127
  170. sycommon/llm/llm_with_token_tracking.py +242 -242
  171. sycommon/llm/native_with_fallback_runnable.py +201 -201
  172. sycommon/llm/output_fixing_runnable.py +216 -216
  173. sycommon/llm/struct_token.py +486 -486
  174. sycommon/llm/sy_langfuse.py +120 -120
  175. sycommon/llm/token_usage_es_service.py +539 -539
  176. sycommon/llm/token_usage_mysql_service.py +818 -818
  177. sycommon/llm/usage_token.py +186 -186
  178. sycommon/logging/async_sql_logger.py +65 -65
  179. sycommon/logging/kafka_log.py +339 -339
  180. sycommon/logging/logger_levels.py +23 -23
  181. sycommon/logging/logger_wrapper.py +25 -25
  182. sycommon/logging/process_logger.py +177 -177
  183. sycommon/logging/sql_logger.py +53 -53
  184. sycommon/middleware/background_execution.py +568 -568
  185. sycommon/middleware/context.py +5 -5
  186. sycommon/middleware/cors.py +16 -16
  187. sycommon/middleware/docs.py +30 -30
  188. sycommon/middleware/exception.py +79 -79
  189. sycommon/middleware/middleware.py +51 -51
  190. sycommon/middleware/monitor_memory.py +22 -22
  191. sycommon/middleware/mq.py +8 -8
  192. sycommon/middleware/sandbox.py +1553 -1553
  193. sycommon/middleware/timeout.py +44 -44
  194. sycommon/middleware/token_tracking.py +173 -173
  195. sycommon/middleware/tool_result_truncation.py +195 -136
  196. sycommon/middleware/traceid.py +312 -312
  197. sycommon/models/base_http.py +101 -101
  198. sycommon/models/log.py +30 -30
  199. sycommon/models/mqlistener_config.py +39 -39
  200. sycommon/models/mqmsg_model.py +11 -11
  201. sycommon/models/mqsend_config.py +8 -8
  202. sycommon/models/sandbox.py +340 -340
  203. sycommon/models/sso_user.py +66 -66
  204. sycommon/models/token_usage.py +25 -25
  205. sycommon/models/token_usage_mysql.py +59 -59
  206. sycommon/models/xxljob_handler_config.py +11 -11
  207. sycommon/notice/__init__.py +5 -5
  208. sycommon/notice/uvicorn_monitor.py +346 -346
  209. sycommon/notice/wecom_message.py +328 -328
  210. sycommon/rabbitmq/process_pool_consumer.py +850 -850
  211. sycommon/rabbitmq/rabbitmq_client.py +407 -407
  212. sycommon/rabbitmq/rabbitmq_pool.py +324 -324
  213. sycommon/rabbitmq/rabbitmq_service.py +242 -242
  214. sycommon/rabbitmq/rabbitmq_service_client_manager.py +252 -252
  215. sycommon/rabbitmq/rabbitmq_service_connection_monitor.py +108 -108
  216. sycommon/rabbitmq/rabbitmq_service_consumer_manager.py +243 -243
  217. sycommon/rabbitmq/rabbitmq_service_core.py +130 -130
  218. sycommon/rabbitmq/rabbitmq_service_producer_manager.py +231 -231
  219. sycommon/sentry/sy_sentry.py +35 -35
  220. sycommon/services.py +505 -505
  221. sycommon/sse/__init__.py +4 -4
  222. sycommon/sse/event.py +97 -97
  223. sycommon/sse/sse.py +289 -289
  224. sycommon/synacos/__init__.py +9 -9
  225. sycommon/synacos/example.py +248 -248
  226. sycommon/synacos/example2.py +227 -227
  227. sycommon/synacos/feign.py +310 -310
  228. sycommon/synacos/feign_client.py +432 -432
  229. sycommon/synacos/nacos_client_base.py +171 -171
  230. sycommon/synacos/nacos_config_manager.py +163 -163
  231. sycommon/synacos/nacos_heartbeat_manager.py +245 -245
  232. sycommon/synacos/nacos_service.py +286 -286
  233. sycommon/synacos/nacos_service_discovery.py +245 -245
  234. sycommon/synacos/nacos_service_registration.py +263 -263
  235. sycommon/synacos/param.py +75 -75
  236. sycommon/tests/deep_agent_server.py +535 -535
  237. sycommon/tests/test_deep_agent.py +160 -160
  238. sycommon/tests/test_email.py +172 -172
  239. sycommon/tests/test_mq.py +128 -128
  240. sycommon/tools/async_utils.py +26 -26
  241. sycommon/tools/docs.py +42 -42
  242. sycommon/tools/env.py +62 -62
  243. sycommon/tools/merge_headers.py +135 -135
  244. sycommon/tools/snowflake.py +263 -263
  245. sycommon/tools/syemail.py +173 -173
  246. sycommon/tools/timing.py +73 -73
  247. sycommon/xxljob/__init__.py +3 -3
  248. sycommon/xxljob/xxljob_service.py +196 -196
  249. {sycommon_python_lib-0.2.3a1.dist-info → sycommon_python_lib-0.2.3a2.dist-info}/METADATA +149 -149
  250. sycommon_python_lib-0.2.3a2.dist-info/RECORD +264 -0
  251. sycommon_python_lib-0.2.3a1.dist-info/RECORD +0 -264
  252. {sycommon_python_lib-0.2.3a1.dist-info → sycommon_python_lib-0.2.3a2.dist-info}/WHEEL +0 -0
  253. {sycommon_python_lib-0.2.3a1.dist-info → sycommon_python_lib-0.2.3a2.dist-info}/entry_points.txt +0 -0
  254. {sycommon_python_lib-0.2.3a1.dist-info → sycommon_python_lib-0.2.3a2.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
+ ]