markdown-flow 0.2.13__tar.gz → 0.2.15__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.

Potentially problematic release.


This version of markdown-flow might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: markdown-flow
3
- Version: 0.2.13
3
+ Version: 0.2.15
4
4
  Summary: An agent library designed to parse and process MarkdownFlow documents
5
5
  Project-URL: Homepage, https://github.com/ai-shifu/markdown-flow-agent-py
6
6
  Project-URL: Bug Tracker, https://github.com/ai-shifu/markdown-flow-agent-py/issues
@@ -83,4 +83,4 @@ __all__ = [
83
83
  "replace_variables_in_text",
84
84
  ]
85
85
 
86
- __version__ = "0.2.13"
86
+ __version__ = "0.2.15"
@@ -927,41 +927,65 @@ Original Error: {error_message}
927
927
 
928
928
  Task: Analyze the given content block and determine if it needs to be converted to an interaction block to collect user information.
929
929
 
930
- **Core Principle**: Only convert when the text indicates a need to COLLECT and STORE user input into a variable (usually marked with {{variable_name}} or similar patterns).
931
-
932
- Judgment criteria for CONVERSION:
933
- 1. **Variable Storage Requirement**: The text explicitly or implicitly mentions:
934
- - Storing user input into a variable (e.g., "record to {{style}}", "save as {{preference}}")
935
- - Collecting information for later use in the workflow
936
- - Building user profile or preferences that will be referenced later
937
-
938
- 2. **Data Collection Intent**: The interaction aims to:
939
- - Gather user choices that will affect subsequent steps
940
- - Collect structured information that needs to be preserved
941
- - Create reusable data points for the conversation flow
942
-
943
- DO NOT convert if:
944
- - The text only describes an action or recommendation without collecting input
945
- - It's showing/displaying information based on existing variables (e.g., "based on {{history}}")
946
- - It's a simple question without the need to store the response
947
- - The text is performing an operation using already collected data
948
-
949
- Examples:
950
- ❌ Don't convert: "询问想了解的朝代:"
951
- (Simple inquiry, no storage indicated)
952
-
953
- Don't convert: "根据{{history}}的选择推荐选这个朝代的皇帝或者年号"
954
- (Using existing variable, not collecting new data)
955
-
956
- Convert: "根据用户提供{{故事类型}},进一步询问用户故事风格,比如幽默,搞笑,文言文等.并且记录到{{风格}}"
957
- (Explicitly mentions collecting and storing to {{风格}})
958
-
959
- ✅ Convert: "请选择您的偏好并保存到{{user_preference}}"
960
- (Clear intent to store user input)
961
-
962
- Key indicator: Look for phrases like "记录到", "保存为", "存储到", "collect as", "save to", or the presence of target variables {{}} for storing new input.
963
-
964
- If conversion is needed, generate a STANDARD interaction block format with SPECIFIC options based on the document-level instructions and context provided in the user message."""
930
+ **ABSOLUTE RULE**: Convert ONLY when ALL THREE mandatory elements are explicitly present:
931
+ 1. Storage action word + target connector + variable
932
+ 2. No exceptions, no implications, no assumptions
933
+
934
+ **MANDATORY TRIPLE PATTERN (ALL REQUIRED):**
935
+
936
+ **Element 1: Storage Action Words**
937
+ - Chinese: "记录", "保存", "存储", "收集", "采集"
938
+ - English: "save", "store", "record", "collect", "gather"
939
+
940
+ **Element 2: Target Connection Words**
941
+ - Chinese: "到", "为", "在", "至"
942
+ - English: "to", "as", "in", "into"
943
+
944
+ **Element 3: Target Variable**
945
+ - Must contain {{variable_name}} syntax for NEW data storage
946
+ - Variable must be for collecting NEW information, not using existing data
947
+
948
+ **VALID CONVERSION FORMULA:**
949
+ [Storage Word] + [Connector] + {{new_variable}}
950
+
951
+ Examples of VALID patterns:
952
+ - "...记录到{{姓名}}"
953
+ - "...保存为{{偏好}}"
954
+ - "...存储在{{选择}}"
955
+ - "...save to {{preference}}"
956
+ - "...collect as {{user_input}}"
957
+
958
+ **STRICT EXCLUSION RULES:**
959
+
960
+ NEVER convert if missing ANY element:
961
+ - No storage action word = NO conversion
962
+ - No target connector = NO conversion
963
+ - No {{variable}} = NO conversion
964
+ - Using existing {{variable}} instead of collecting new = NO conversion
965
+
966
+ ❌ NEVER convert casual conversation:
967
+ - Simple questions without storage intent
968
+ - Introduction requests without persistence
969
+ - General inquiries without data collection
970
+ - Educational or exploratory content
971
+
972
+ ❌ NEVER infer or assume storage intent:
973
+ - Don't assume "询问姓名" means "保存姓名"
974
+ - Don't assume "了解偏好" means "记录偏好"
975
+ - Don't assume data collection without explicit storage words
976
+
977
+ **PATTERN ANALYSIS METHOD:**
978
+ 1. **Exact Pattern Match**: Search for [Storage Word] + [Connector] + {{variable}}
979
+ 2. **No Pattern = No Conversion**: If exact pattern not found, return needs_interaction: false
980
+ 3. **Zero Tolerance**: No partial matches, no similar meanings, no interpretations
981
+
982
+ **ULTRA-CONSERVATIVE APPROACH:**
983
+ - If there's ANY doubt about storage intent = DON'T convert
984
+ - If storage pattern is not 100% explicit = DON'T convert
985
+ - If you need to "interpret" or "infer" storage intent = DON'T convert
986
+ - Prefer false negatives over false positives
987
+
988
+ When exact pattern is found, generate structured interaction data. Otherwise, always return needs_interaction: false."""
965
989
 
966
990
  # User message with content and context
967
991
  # Build user prompt with document context
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: markdown-flow
3
- Version: 0.2.13
3
+ Version: 0.2.15
4
4
  Summary: An agent library designed to parse and process MarkdownFlow documents
5
5
  Project-URL: Homepage, https://github.com/ai-shifu/markdown-flow-agent-py
6
6
  Project-URL: Bug Tracker, https://github.com/ai-shifu/markdown-flow-agent-py/issues
File without changes
File without changes
File without changes