markdown-flow 0.4.2.dev1__tar.gz → 0.4.2.dev3__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.
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/PKG-INFO +1 -1
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/__init__.py +1 -1
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/parser/document_blocks.py +22 -7
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/parser/document_context.py +7 -3
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow.egg-info/PKG-INFO +1 -1
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/LICENSE +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/README.md +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/constants.py +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/constants_system_prompt.py +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/core.py +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/enums.py +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/escaping.py +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/exceptions.py +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/formatter/__init__.py +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/formatter/classifier.py +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/formatter/format.py +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/formatter/patterns.py +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/formatter/sanitize.py +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/formatter/stream.py +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/formatter/types.py +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/higher_priority_prompt.md +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/llm.py +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/models.py +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/parser/__init__.py +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/parser/code_fence_utils.py +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/parser/html_comment_utils.py +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/parser/interaction.py +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/parser/json_parser.py +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/parser/output.py +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/parser/preprocessor.py +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/parser/validation.py +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/parser/variable.py +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/providers/__init__.py +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/providers/config.py +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/providers/openai.py +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/system_prompt.md +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/tag_filter.py +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/variable_names.py +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow.egg-info/SOURCES.txt +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow.egg-info/dependency_links.txt +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow.egg-info/top_level.txt +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/pyproject.toml +0 -0
- {markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: markdown-flow
|
|
3
|
-
Version: 0.4.2.
|
|
3
|
+
Version: 0.4.2.dev3
|
|
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
|
{markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/parser/document_blocks.py
RENAMED
|
@@ -345,6 +345,7 @@ class DocumentBlocks:
|
|
|
345
345
|
self.text = text
|
|
346
346
|
self.html_pattern = html
|
|
347
347
|
self._html_token_ends: dict[tuple[int, bool], int | None] = {}
|
|
348
|
+
self._container_ends: dict[tuple[int, bool], int] = {}
|
|
348
349
|
self._html_last_ends: dict[str, int] | None = None
|
|
349
350
|
self.lines = physical_lines(text)
|
|
350
351
|
self.closed_fence_lines: set[int] = set()
|
|
@@ -414,15 +415,29 @@ class DocumentBlocks:
|
|
|
414
415
|
steps = self.container_steps[index]
|
|
415
416
|
if not steps:
|
|
416
417
|
return len(self.text)
|
|
417
|
-
|
|
418
|
+
key = (index, final)
|
|
419
|
+
if key in self._container_ends:
|
|
420
|
+
return self._container_ends[key]
|
|
421
|
+
covered = [index]
|
|
422
|
+
end = len(self.text)
|
|
423
|
+
for following in range(index + 1, len(self.lines)):
|
|
424
|
+
line = self.lines[following]
|
|
418
425
|
value = self.text[line.start : line.content_end]
|
|
419
426
|
if container_content_start(value, steps) is None and value.strip(" \t"):
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
427
|
+
partial = container_content_start(value, steps, partial=True)
|
|
428
|
+
if not (partial == len(value) or not final and line.end == line.content_end == len(self.text) and partial is not None):
|
|
429
|
+
end = line.start
|
|
430
|
+
break
|
|
431
|
+
if self.container_steps[following] == steps:
|
|
432
|
+
following_key = (following, final)
|
|
433
|
+
if following_key in self._container_ends:
|
|
434
|
+
# The cached query excludes its own line, which was checked above.
|
|
435
|
+
end = self._container_ends[following_key]
|
|
436
|
+
break
|
|
437
|
+
covered.append(following)
|
|
438
|
+
for following in covered:
|
|
439
|
+
self._container_ends[(following, final)] = end
|
|
440
|
+
return end
|
|
426
441
|
|
|
427
442
|
def fence(self, start: int, *, final: bool = True) -> BlockSpan | None:
|
|
428
443
|
"""Read plain or quote/list-contained fenced code."""
|
{markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/parser/document_context.py
RENAMED
|
@@ -410,7 +410,8 @@ def _document_units(text: str) -> Iterator[tuple[int, int, bool]]:
|
|
|
410
410
|
continue
|
|
411
411
|
if text.startswith("?[", at):
|
|
412
412
|
limit, closed = reader.blocks.interaction_limit(at + 2, lambda position: marker.end if (marker := read_variable_marker(text, position)) is not None else None)
|
|
413
|
-
|
|
413
|
+
if not (closed and text[limit + 1 : limit + 2] == "("):
|
|
414
|
+
interaction_until = limit if closed else limit - 1
|
|
414
415
|
if text.startswith("{{", at):
|
|
415
416
|
marker = read_variable_marker(text, at)
|
|
416
417
|
end = marker.end if marker is not None else len(text)
|
|
@@ -459,8 +460,11 @@ def find_document_interaction_spans(text: str) -> Iterator[tuple[int, int]]:
|
|
|
459
460
|
if not closed:
|
|
460
461
|
at = end
|
|
461
462
|
continue
|
|
462
|
-
if text[end + 1 : end + 2]
|
|
463
|
-
|
|
463
|
+
if text[end + 1 : end + 2] == "(":
|
|
464
|
+
# Replay the native label instead of losing its resource state.
|
|
465
|
+
at += 1
|
|
466
|
+
continue
|
|
467
|
+
yield at, end + 1
|
|
464
468
|
at = end + 1
|
|
465
469
|
else:
|
|
466
470
|
at += 1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: markdown-flow
|
|
3
|
-
Version: 0.4.2.
|
|
3
|
+
Version: 0.4.2.dev3
|
|
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
|
{markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/constants_system_prompt.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/higher_priority_prompt.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/parser/code_fence_utils.py
RENAMED
|
File without changes
|
{markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow/parser/html_comment_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{markdown_flow-0.4.2.dev1 → markdown_flow-0.4.2.dev3}/markdown_flow.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|