langchain-agentx-python 2.2.7__py3-none-any.whl → 2.2.8__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.
@@ -11,7 +11,7 @@ from langchain_agentx import create_loop_agent
11
11
  ```
12
12
  """
13
13
 
14
- __version__ = "2.2.7"
14
+ __version__ = "2.2.8"
15
15
 
16
16
  from .loop import ( # noqa: F401
17
17
  create_loop_agent,
@@ -25,12 +25,12 @@ MAX_PREVIEW_SNAPSHOT_CHARS: int = 8192
25
25
  # present():每段 preview / snapshot 写入模型可见文本时的默认截断
26
26
  PRESENT_PREVIEW_SNIPPET_MAX: int = 500
27
27
 
28
- # 全角问号(中文输入法常见);校验要求 ASCII '?'
28
+ # 全角问号(中文输入法常见);仅作 normalize 软转换,不作为 validate 硬拒条件
29
29
  FULLWIDTH_QUESTION_MARK: str = "\uff1f"
30
30
 
31
31
 
32
32
  def normalize_question_text(text: str) -> str:
33
- """将题干末尾全角 ``?`` 规范为 ASCII ``?``(CC / QuestionValidator 一致)。"""
33
+ """将题干末尾全角 ``?`` 规范为 ASCII ``?``(展示一致性;校验不强制末尾问号)。"""
34
34
  if text.endswith(FULLWIDTH_QUESTION_MARK):
35
35
  return text[:-1] + "?"
36
36
  return text
@@ -2,13 +2,14 @@
2
2
  tools/ask_user_question/validators.py — QuestionValidator
3
3
 
4
4
  职责:
5
- 封装单题与整卷语义校验(问号、选项数、label 唯一、multiSelect v2 约束等)。
5
+ 封装单题与整卷语义校验(非空题干、选项数、label 唯一等)。
6
6
 
7
7
  链路位置:
8
8
  AskUserQuestionTool.validate_input 委托本类。
9
9
 
10
10
  当前裁剪范围:
11
- 含 preview 长度(dict 路径,与 Pydantic max_length 双保险);HTML 规则在 HtmlPreviewValidator(v3)。
11
+ 题干末尾问号仅为 schema/prompt 软提示(对齐 CC validateInput,无硬拒);
12
+ preview 长度与 Pydantic 双保险;HTML 规则在 HtmlPreviewValidator。
12
13
 
13
14
  """
14
15
 
@@ -32,11 +33,12 @@ class QuestionValidator:
32
33
  code="MISSING_QUESTION_FIELD",
33
34
  )
34
35
  question_text = question["question"]
35
- if not isinstance(question_text, str) or not question_text.endswith("?"):
36
+ # CC: Zod describe 建议 end with '?';validateInput 不硬拒末尾字符。
37
+ if not isinstance(question_text, str) or not question_text.strip():
36
38
  return ValidationResult(
37
39
  ok=False,
38
- message=f"Question at index {index}: '{question_text}' must end with '?'",
39
- code="QUESTION_NO_QUESTION_MARK",
40
+ message=f"Question at index {index}: 'question' must be a non-empty string",
41
+ code="EMPTY_QUESTION_TEXT",
40
42
  )
41
43
 
42
44
  header = question.get("header", "")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: langchain-agentx-python
3
- Version: 2.2.7
3
+ Version: 2.2.8
4
4
  Summary: LangChain/LangGraph-based agent utilities for CodeBaseX.
5
5
  Author-email: GoodMood2008 <GoodMood2008@users.noreply.github.com>
6
6
  License: Apache License
@@ -1,4 +1,4 @@
1
- langchain_agentx/__init__.py,sha256=u163iBLScsjUuLfV2YYL3tProAOl3aRQEK1lyYmWoJA,1614
1
+ langchain_agentx/__init__.py,sha256=LJcHRX1vByixzGF-W9TusSlpy5m55fezzOqb0utYbrU,1614
2
2
  langchain_agentx/command/__init__.py,sha256=Ej260S5uFQcmEtGZQG_NH7BYjHoStrpBLtGUsBTxyZk,631
3
3
  langchain_agentx/command/allowed_tools.py,sha256=TVA0VM8rm98H-QbLK_GRiX5RhEAZFxKawliMi4kk96A,3359
4
4
  langchain_agentx/command/context.py,sha256=DIGOGPBw5UGDBm0WNNJlKx1h_9rCRmcdROv4DT61Qug,731
@@ -520,12 +520,12 @@ langchain_agentx/tools/agent/registry/__init__.py,sha256=Ts5_OJzTnbiqZDxXqMI1UnF
520
520
  langchain_agentx/tools/agent/registry/config.py,sha256=4bcI0Gq1Kqclc3y6YsDhVSkc8tNTkslQAPqy5ZSgF-Y,1628
521
521
  langchain_agentx/tools/agent/registry/registry.py,sha256=knii6XWFZvPkcqzTK3Y4PX5evGcDmto4SsZ7VzUsPSI,1544
522
522
  langchain_agentx/tools/ask_user_question/__init__.py,sha256=bDHVPc4dHBw___7rbaTxClsbDpQ-jLt5Obj8R2VBLAc,444
523
- langchain_agentx/tools/ask_user_question/constants.py,sha256=vK5QraZBBVj7woW1TF08G-MecrooCa-gl9RPH9CvHKE,1229
523
+ langchain_agentx/tools/ask_user_question/constants.py,sha256=rqlL31BTSNY2spn8f2i-MtKjy3y3QoLFAeqenFmYe6Q,1283
524
524
  langchain_agentx/tools/ask_user_question/html_preview.py,sha256=OwNpsH9qm8iJ-TTbzkMFvG49T4-oNJXJXH4OZ8r55wc,3913
525
525
  langchain_agentx/tools/ask_user_question/models.py,sha256=uLc2UK_v8iMFEL1Zk0mUOBYdcg2HfbaLdH68o8kr7GE,3376
526
526
  langchain_agentx/tools/ask_user_question/prompt.py,sha256=0RdVuUeNzQBzPeVrLcbiBqh1uizFgUANvaKOZpVy_qg,2803
527
527
  langchain_agentx/tools/ask_user_question/tool.py,sha256=DgU7OBAqrJBb77ewQ76okoUFJxTThAiN6PRMPa8_FvU,13467
528
- langchain_agentx/tools/ask_user_question/validators.py,sha256=gUYuuKJNrExWGvhFlmhqqSU8ax7s4EhXMvTEjapHeiY,5974
528
+ langchain_agentx/tools/ask_user_question/validators.py,sha256=Uc88cBzqUp0PNG_Jf2yX2WtKP8hzBsnkMb_KUXh9C4M,6088
529
529
  langchain_agentx/tools/bash/__init__.py,sha256=molPHFDylE2wWG_aQx7fb0ciAx3wWpdXzIixTZV5ne4,214
530
530
  langchain_agentx/tools/bash/ast_security.py,sha256=6DFd_TwT986dbGkKT3UnDIZioBdmi8mbJcYSI-XEtdM,22444
531
531
  langchain_agentx/tools/bash/auto_mode_adapter.py,sha256=7-yb_kGmpytBYkD2Hn5YWPIceo_YN4PatEKj8O7HKsM,4243
@@ -761,8 +761,8 @@ langchain_agentx/workspace/root_grant_manager.py,sha256=W3gy8HTevbERbXqIgRcjzOXO
761
761
  langchain_agentx/workspace/tool_boundary.py,sha256=UDwX6swpSLsx9HNkYuuRRiV5o7ZZG_Bru2Yn0c5kNX8,5724
762
762
  langchain_agentx/workspace/validators.py,sha256=tQt-6TOcL8Fw7Ig5ebA9S7vGWh1rby920eFW6x8Tk9E,1439
763
763
  langchain_agentx/workspace/view.py,sha256=PGasqTaqhlD03SXXazHuw4RHfV681AIdlsYqL70pEjc,4774
764
- langchain_agentx_python-2.2.7.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
765
- langchain_agentx_python-2.2.7.dist-info/METADATA,sha256=hqm9pkU7FcAv244Gd1gPQyI1-A81Xf3uWQmi9YZq-Wg,24250
766
- langchain_agentx_python-2.2.7.dist-info/WHEEL,sha256=51RkbunBAw4BWsgaQWTpPhg4Diwp3c9P5iaLk67Hdtg,92
767
- langchain_agentx_python-2.2.7.dist-info/top_level.txt,sha256=Ge284pniNt8xea0OLk2o9o32GqVpDhOYk20fwE-0xxA,17
768
- langchain_agentx_python-2.2.7.dist-info/RECORD,,
764
+ langchain_agentx_python-2.2.8.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
765
+ langchain_agentx_python-2.2.8.dist-info/METADATA,sha256=zGJT9dLY-3VueNxw8g-rgeUuaWvpKMIb1nnc6ka5zFY,24250
766
+ langchain_agentx_python-2.2.8.dist-info/WHEEL,sha256=51RkbunBAw4BWsgaQWTpPhg4Diwp3c9P5iaLk67Hdtg,92
767
+ langchain_agentx_python-2.2.8.dist-info/top_level.txt,sha256=Ge284pniNt8xea0OLk2o9o32GqVpDhOYk20fwE-0xxA,17
768
+ langchain_agentx_python-2.2.8.dist-info/RECORD,,