sycommon-python-lib 0.2.5a38__py3-none-any.whl → 0.2.5a40__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.
@@ -762,13 +762,10 @@ class DeepAgent:
762
762
 
763
763
  # 发送 tool_call 事件,前端根据 tool_call_id 更新
764
764
  tc_id = existing_tc["id"]
765
- if tc_id:
765
+ if tc_id and tc_id not in seen_tool_call_ids:
766
766
  current_args = existing_tc["args"]
767
- # 只有以下情况才发送:
768
- # 1. 首次出现(args 为空,先发一个占位)
769
- # 2. args 解析成功(有实质更新)
770
767
  is_first = not existing_tc.get("_sent")
771
- if is_first or args_parsed:
768
+ if is_first:
772
769
  event = ChatEventBuilder.tool_call(
773
770
  name=existing_tc["name"],
774
771
  args=current_args,
@@ -777,6 +774,7 @@ class DeepAgent:
777
774
  agent=DEFAULT_AGENT_NAME,
778
775
  )
779
776
  existing_tc["_sent"] = True
777
+ seen_tool_call_ids.add(tc_id)
780
778
  if on_event:
781
779
  await on_event(event)
782
780
  yield event
@@ -788,6 +786,9 @@ class DeepAgent:
788
786
  tc_id = tc.get("id", "")
789
787
  if not tc_id:
790
788
  continue
789
+ if tc_id in seen_tool_call_ids:
790
+ continue
791
+ seen_tool_call_ids.add(tc_id)
791
792
 
792
793
  tc_name = tc.get("name", "unknown")
793
794
  tc_args = tc.get("args", {})
@@ -329,7 +329,10 @@ def _kill_process_tree(process):
329
329
  except (ProcessLookupError, PermissionError):
330
330
  pass
331
331
  else:
332
- _kill_process_tree(process)
332
+ try:
333
+ os.killpg(os.getpgid(process.pid), signal.SIGKILL)
334
+ except (ProcessLookupError, PermissionError, OSError):
335
+ pass
333
336
 
334
337
 
335
338
  def _build_execute_command(init_script: str, user_command: str) -> tuple[str, dict]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sycommon-python-lib
3
- Version: 0.2.5a38
3
+ Version: 0.2.5a40
4
4
  Summary: Add your description here
5
5
  Requires-Python: >=3.11
6
6
  Description-Content-Type: text/markdown
@@ -129,7 +129,7 @@ sycommon/services.py,sha256=pUcV0xFrn1hrArD9YwE8m6CMrrWPwNBAqUIWhgsVkzY,24943
129
129
  sycommon/agent/__init__.py,sha256=mxceAeUifQ-DKvWp7ZEJIFlmOCb5wpYHPGQw3rwEN8I,4378
130
130
  sycommon/agent/agent_manager.py,sha256=UhhaekEumT7g4v_Z1UB4jTp13X0n8M8erYaQdkGGWkA,13620
131
131
  sycommon/agent/chat_events.py,sha256=t7qWa6OrIWLfqtd1AnqaVP67QWkn1JxpCBTZYQpoLuM,14226
132
- sycommon/agent/deep_agent.py,sha256=VusZURT_SKsMjje7rmUNjtS01Ootqr2C_fq5eORXAJY,63333
132
+ sycommon/agent/deep_agent.py,sha256=rJXVE-bA9Ypi1VDdT4iEHDuonEM3FsA5qWuIYSt8GtA,63362
133
133
  sycommon/agent/multi_agent_team.py,sha256=SRCZHswfflU1w38_YaF0pqh20qa5N5xqcGAVCBoZzmM,26675
134
134
  sycommon/agent/summarization_utils.py,sha256=fiwvKYE_eQc1EtBiPT4UyOZoqQdd4JwEsLRDsJNioLQ,14928
135
135
  sycommon/agent/mcp/__init__.py,sha256=iKrdDhIrFsNIkqG_kgcwNe-nOiM6uVfolKv44LfQ-FQ,636
@@ -210,7 +210,7 @@ sycommon/middleware/exception.py,sha256=UAy0tKijI_2JoKjwT3h62aL-tybftP3IETvcr26N
210
210
  sycommon/middleware/middleware.py,sha256=1qA_0rT7pv1xTfuvA0kdYkxVOHYT6roSSNO7Cmf2wYg,1778
211
211
  sycommon/middleware/monitor_memory.py,sha256=pYRK-wRuDd6enSg9Pf8tQxPdYQS6S0AyjyXeKFRLKEs,628
212
212
  sycommon/middleware/mq.py,sha256=9X6KKtadFjBXKS5L3kEKujYio9wwGfWgXwWOAHO-HDg,254
213
- sycommon/middleware/sandbox.py,sha256=er0zeHLQtHJqSr27fGcKbAtRo1ZOQ-Lqif8ALWNFSak,47858
213
+ sycommon/middleware/sandbox.py,sha256=lvcstHQJ6WfcUo1T_b06PU_iHkRc6f38RKsYzp1Inow,47978
214
214
  sycommon/middleware/timeout.py,sha256=KlxOPa8xl2dg6yuRi_EzkVJG8bX4stb5ueYxctzzGM8,1433
215
215
  sycommon/middleware/token_tracking.py,sha256=rEbgV1bgWMdzAERx4aq5XAvOIT6jTY_tK1P0xHJnL3o,6609
216
216
  sycommon/middleware/tool_result_truncation.py,sha256=SREo6tb_RDHxqiQdO0N82pio-Cpo0YSrHNa1sASUafM,12429
@@ -282,8 +282,8 @@ sycommon/tools/syemail.py,sha256=BDFhgf7WDOQeTcjxJEQdu0dQhnHFPO_p3eI0-Ni3LhQ,561
282
282
  sycommon/tools/timing.py,sha256=OiiE7P07lRoMzX9kzb8sZU9cDb0zNnqIlY5pWqHcnkY,2064
283
283
  sycommon/xxljob/__init__.py,sha256=7eoBlQxv-B39IfRSCY2bkqdGYs1QRe1umAWd88VMEEM,86
284
284
  sycommon/xxljob/xxljob_service.py,sha256=JIEJaGXhqrTLcyxlyynSrsHg9bBnDNzX-D4qIWLRPUE,6815
285
- sycommon_python_lib-0.2.5a38.dist-info/METADATA,sha256=ZpqFN3mks3IrAOrr8_85SIT8YLXH8JjT9ukEerUL3bU,7914
286
- sycommon_python_lib-0.2.5a38.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
287
- sycommon_python_lib-0.2.5a38.dist-info/entry_points.txt,sha256=gsR4SssKxDWjRU8ggidzNcdMXDPRSKRS7UaGyNP84Qg,92
288
- sycommon_python_lib-0.2.5a38.dist-info/top_level.txt,sha256=RgphKrg7nJyZ7irJqbxFr-5H2LUYTvI7ivoWZH2hcD0,29
289
- sycommon_python_lib-0.2.5a38.dist-info/RECORD,,
285
+ sycommon_python_lib-0.2.5a40.dist-info/METADATA,sha256=oU0fnG1siYsT6N3ZR2mdFPrVtUjLc4FLdG8Dpout6a4,7914
286
+ sycommon_python_lib-0.2.5a40.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
287
+ sycommon_python_lib-0.2.5a40.dist-info/entry_points.txt,sha256=gsR4SssKxDWjRU8ggidzNcdMXDPRSKRS7UaGyNP84Qg,92
288
+ sycommon_python_lib-0.2.5a40.dist-info/top_level.txt,sha256=RgphKrg7nJyZ7irJqbxFr-5H2LUYTvI7ivoWZH2hcD0,29
289
+ sycommon_python_lib-0.2.5a40.dist-info/RECORD,,