fabricatio 0.4.0__tar.gz → 0.4.0.dev2__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.
Files changed (139) hide show
  1. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/.github/workflows/build-package.yaml +1 -1
  2. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/Cargo.toml +0 -1
  3. fabricatio-0.4.0.dev2/Makefile +33 -0
  4. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/PKG-INFO +1 -1
  5. fabricatio-0.4.0.dev2/packages/fabricatio-actions/LICENSE +21 -0
  6. fabricatio-0.4.0.dev2/packages/fabricatio-actions/pyproject.toml +28 -0
  7. fabricatio-0.4.0.dev2/packages/fabricatio-improve/LICENSE +21 -0
  8. fabricatio-0.4.0.dev2/packages/fabricatio-improve/pyproject.toml +29 -0
  9. fabricatio-0.4.0.dev2/packages/fabricatio-judge/LICENSE +21 -0
  10. fabricatio-0.4.0.dev2/packages/fabricatio-judge/pyproject.toml +28 -0
  11. fabricatio-0.4.0.dev2/packages/fabricatio-rule/LICENSE +21 -0
  12. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-rule/pyproject.toml +13 -2
  13. fabricatio-0.4.0.dev2/publish_subpackages.py +146 -0
  14. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/pyproject.toml +1 -1
  15. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/python/fabricatio/toolboxes/__init__.py +1 -1
  16. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/uv.lock +248 -8
  17. fabricatio-0.4.0/Makefile +0 -31
  18. fabricatio-0.4.0/packages/fabricatio-actions/pyproject.toml +0 -18
  19. fabricatio-0.4.0/packages/fabricatio-improve/pyproject.toml +0 -19
  20. fabricatio-0.4.0/packages/fabricatio-judge/pyproject.toml +0 -18
  21. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/.github/workflows/ruff.yaml +0 -0
  22. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/.github/workflows/tests.yaml +0 -0
  23. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/.gitignore +0 -0
  24. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/Cargo.lock +0 -0
  25. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/LICENSE +0 -0
  26. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/README.md +0 -0
  27. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/correct/correct.py +0 -0
  28. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/correct/correct_loop.py +0 -0
  29. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/extract_and_inject/.gitignore +0 -0
  30. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/extract_and_inject/article_rag.py +0 -0
  31. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/extract_and_inject/ask.py +0 -0
  32. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/extract_and_inject/chunk_article.py +0 -0
  33. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/extract_and_inject/extract_and_inject.py +0 -0
  34. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/extract_article/extract.py +0 -0
  35. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/llm_usages/llm_usage.py +0 -0
  36. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/make_a_rating/rating.py +0 -0
  37. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/make_diary/commits.json +0 -0
  38. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/make_diary/diary.py +0 -0
  39. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/minor/hello_fabricatio.py +0 -0
  40. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/minor/write_a_poem.py +0 -0
  41. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/propose_task/.gitignore +0 -0
  42. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/propose_task/propose.py +0 -0
  43. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/reviewer/censor.py +0 -0
  44. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/reviewer/review.py +0 -0
  45. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/rules/.gitignore +0 -0
  46. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/rules/draft_ruleset.py +0 -0
  47. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/search_bibtex/.gitignore +0 -0
  48. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/search_bibtex/search.py +0 -0
  49. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/simple_chat/chat.py +0 -0
  50. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/simple_rag/simple_rag.py +0 -0
  51. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/task_handle/handle_task.py +0 -0
  52. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/write_article/.gitignore +0 -0
  53. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/write_article/article_rag.py +0 -0
  54. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/write_article/post_process.py +0 -0
  55. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/write_article/write_article.py +0 -0
  56. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/write_outline/.gitignore +0 -0
  57. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/write_outline/write_outline.py +0 -0
  58. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/examples/write_outline/write_outline_corrected.py +0 -0
  59. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-actions/README.md +0 -0
  60. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-actions/python/fabricatio_actions/__init__.py +0 -0
  61. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-actions/python/fabricatio_actions/actions/__init__.py +0 -0
  62. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-actions/python/fabricatio_actions/actions/fs.py +0 -0
  63. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-actions/python/fabricatio_actions/actions/output.py +0 -0
  64. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-actions/python/fabricatio_actions/models/generic.py +0 -0
  65. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-actions/python/fabricatio_actions/py.typed +0 -0
  66. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-improve/README.md +0 -0
  67. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-improve/python/fabricatio_improve/__init__.py +0 -0
  68. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-improve/python/fabricatio_improve/capabilities/correct.py +0 -0
  69. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-improve/python/fabricatio_improve/capabilities/review.py +0 -0
  70. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-improve/python/fabricatio_improve/models/improve.py +0 -0
  71. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-improve/python/fabricatio_improve/models/kwargs_types.py +0 -0
  72. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-improve/python/fabricatio_improve/models/problem.py +0 -0
  73. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-improve/python/fabricatio_improve/py.typed +0 -0
  74. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-judge/README.md +0 -0
  75. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-judge/python/fabricatio_judge/__init__.py +0 -0
  76. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-judge/python/fabricatio_judge/capabilities/advanced_judge.py +0 -0
  77. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-judge/python/fabricatio_judge/models/advanced_judge.py +0 -0
  78. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-judge/python/fabricatio_judge/py.typed +0 -0
  79. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-rule/README.md +0 -0
  80. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-rule/python/fabricatio_rule/__init__.py +0 -0
  81. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-rule/python/fabricatio_rule/actions/__init__.py +0 -0
  82. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-rule/python/fabricatio_rule/actions/rules.py +0 -0
  83. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-rule/python/fabricatio_rule/capabilities/__init__.py +0 -0
  84. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-rule/python/fabricatio_rule/capabilities/censor.py +0 -0
  85. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-rule/python/fabricatio_rule/capabilities/check.py +0 -0
  86. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-rule/python/fabricatio_rule/models/__init__.py +0 -0
  87. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-rule/python/fabricatio_rule/models/kwargs_types.py +0 -0
  88. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-rule/python/fabricatio_rule/models/patch.py +0 -0
  89. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-rule/python/fabricatio_rule/models/rule.py +0 -0
  90. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/packages/fabricatio-rule/python/fabricatio_rule/py.typed +0 -0
  91. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/python/fabricatio/__init__.py +0 -0
  92. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/python/fabricatio/py.typed +0 -0
  93. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/python/fabricatio/toolboxes/arithmetic.py +0 -0
  94. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/python/fabricatio/toolboxes/fs.py +0 -0
  95. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/python/fabricatio/workflows/__init__.py +0 -0
  96. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/python/fabricatio/workflows/rag.py +0 -0
  97. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/src/lib.rs +0 -0
  98. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/as_prompt.hbs +0 -0
  99. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/binary-exploitation-ctf-solver.hbs +0 -0
  100. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/chap_summary.hbs +0 -0
  101. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/check_string.hbs +0 -0
  102. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/claude-xml.hbs +0 -0
  103. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/clean-up-code.hbs +0 -0
  104. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/co_validation.hbs +0 -0
  105. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/create_json_obj.hbs +0 -0
  106. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/cryptography-ctf-solver.hbs +0 -0
  107. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/dependencies.hbs +0 -0
  108. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/document-the-code.hbs +0 -0
  109. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/draft_rating_criteria.hbs +0 -0
  110. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/draft_rating_manual.hbs +0 -0
  111. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/draft_rating_weights_klee.hbs +0 -0
  112. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/draft_tool_usage_code.hbs +0 -0
  113. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/extract.hbs +0 -0
  114. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/extract_criteria_from_reasons.hbs +0 -0
  115. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/extract_reasons_from_examples.hbs +0 -0
  116. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/find-security-vulnerabilities.hbs +0 -0
  117. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/fix-bugs.hbs +0 -0
  118. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/fix_troubled_obj.hbs +0 -0
  119. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/fix_troubled_string.hbs +0 -0
  120. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/generic_string.hbs +0 -0
  121. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/improve-performance.hbs +0 -0
  122. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/liststr.hbs +0 -0
  123. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/make_choice.hbs +0 -0
  124. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/make_judgment.hbs +0 -0
  125. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/pathstr.hbs +0 -0
  126. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/rate_fine_grind.hbs +0 -0
  127. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/refactor.hbs +0 -0
  128. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/refined_query.hbs +0 -0
  129. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/research_content_summary.hbs +0 -0
  130. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/retrieved_display.hbs +0 -0
  131. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/reverse-engineering-ctf-solver.hbs +0 -0
  132. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/review_string.hbs +0 -0
  133. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/rule_requirement.hbs +0 -0
  134. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/ruleset_requirement_breakdown.hbs +0 -0
  135. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/task_briefing.hbs +0 -0
  136. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/web-ctf-solver.hbs +0 -0
  137. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/write-git-commit.hbs +0 -0
  138. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/write-github-pull-request.hbs +0 -0
  139. {fabricatio-0.4.0 → fabricatio-0.4.0.dev2}/templates/built-in/write-github-readme.hbs +0 -0
@@ -105,7 +105,7 @@ jobs:
105
105
 
106
106
  - name: Install deps
107
107
  run: |
108
- uv sync --no-install-project --all-extras --index https://pypi.org/simple -p ${{ matrix.python-version }}
108
+ uv sync --no-install-project --only-dev --index https://pypi.org/simple -p ${{ matrix.python-version }}
109
109
 
110
110
  - name: Build
111
111
  run: |
@@ -16,4 +16,3 @@ pyo3 = { version = "0.24.2", features = ["extension-module"] }
16
16
  [workspace.package]
17
17
  authors = ["Whth <zettainspector@foxmail.com>"]
18
18
  license-file = "LICENSE"
19
-
@@ -0,0 +1,33 @@
1
+ DIST:=dist
2
+ DATA:=extra
3
+ PY:=3.13
4
+
5
+
6
+ all:bdist
7
+
8
+ dirs:
9
+ mkdir -p $(DIST) $(DATA)
10
+
11
+
12
+ dev:
13
+ cargo build --workspace --bins -r -Z unstable-options --artifact-dir $(DATA)/scripts
14
+ rm $(DATA)/scripts/*.pdb |true
15
+ rm $(DATA)/scripts/*.dwarf |true
16
+ uvx -p $(PY) --project . maturin develop --uv -r
17
+
18
+ bdist: dirs clean dev
19
+ uvx -p $(PY) --project . maturin build --sdist -r -o $(DIST)
20
+ uv run publish_subpackages.py --no-publish
21
+
22
+ clean:
23
+ rm -rf $(DIST)/* $(DATA)/*
24
+
25
+
26
+ test:dev
27
+ uvx -p $(PY) --project . pytest tests
28
+
29
+ publish:
30
+ uv run publish_subpackages.py
31
+
32
+
33
+ .PHONY: dev bdist clean publish test
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fabricatio
3
- Version: 0.4.0
3
+ Version: 0.4.0.dev2
4
4
  Classifier: License :: OSI Approved :: MIT License
5
5
  Classifier: Programming Language :: Rust
6
6
  Classifier: Programming Language :: Python :: 3.12
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Whth Yotta
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,28 @@
1
+ [project]
2
+ name = "fabricatio-actions"
3
+ version = "0.1.0"
4
+ description = "Add your description here"
5
+ readme = "README.md"
6
+ license = { file = "LICENSE" }
7
+ authors = [
8
+ { name = "Whth", email = "zettainspector@foxmail.com" }
9
+ ]
10
+ requires-python = ">=3.12,<3.14"
11
+
12
+ dependencies = [
13
+
14
+ "fabricatio-core"
15
+
16
+ ]
17
+
18
+ [build-system]
19
+ requires = ["hatchling"]
20
+ build-backend = "hatchling.build"
21
+
22
+ [tool.hatch.build.targets.wheel]
23
+ sources = ["python"]
24
+
25
+ [project.urls]
26
+ Homepage = "https://github.com/Whth/fabricatio"
27
+ Repository = "https://github.com/Whth/fabricatio"
28
+ Issues = "https://github.com/Whth/fabricatio/issues"
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Whth Yotta
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,29 @@
1
+ [project]
2
+ name = "fabricatio-improve"
3
+ version = "0.1.0"
4
+ description = "Add your description here"
5
+ readme = "README.md"
6
+ license = { file = "LICENSE" }
7
+ authors = [
8
+ { name = "Whth", email = "zettainspector@foxmail.com" }
9
+ ]
10
+ requires-python = ">=3.12,<3.14"
11
+
12
+ dependencies = [
13
+
14
+ "fabricatio-core",
15
+ "fabricatio-capabilities"
16
+
17
+ ]
18
+
19
+ [build-system]
20
+ requires = ["hatchling"]
21
+ build-backend = "hatchling.build"
22
+
23
+ [tool.hatch.build.targets.wheel]
24
+ sources = ["python"]
25
+
26
+ [project.urls]
27
+ Homepage = "https://github.com/Whth/fabricatio"
28
+ Repository = "https://github.com/Whth/fabricatio"
29
+ Issues = "https://github.com/Whth/fabricatio/issues"
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Whth Yotta
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,28 @@
1
+ [project]
2
+ name = "fabricatio-judge"
3
+ version = "0.1.0"
4
+ description = "Add your description here"
5
+ readme = "README.md"
6
+ license = { file = "LICENSE" }
7
+ authors = [
8
+ { name = "Whth", email = "zettainspector@foxmail.com" }
9
+ ]
10
+ requires-python = ">=3.12,<3.14"
11
+
12
+ dependencies = [
13
+
14
+ "fabricatio-core"
15
+
16
+ ]
17
+
18
+ [build-system]
19
+ requires = ["hatchling"]
20
+ build-backend = "hatchling.build"
21
+
22
+ [tool.hatch.build.targets.wheel]
23
+ sources = ["python"]
24
+
25
+ [project.urls]
26
+ Homepage = "https://github.com/Whth/fabricatio"
27
+ Repository = "https://github.com/Whth/fabricatio"
28
+ Issues = "https://github.com/Whth/fabricatio/issues"
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Whth Yotta
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -2,8 +2,13 @@
2
2
  name = "fabricatio-rule"
3
3
  version = "0.1.0"
4
4
  description = "Add your description here"
5
+ license = { file = "LICENSE" }
6
+ authors = [
7
+ { name = "Whth", email = "zettainspector@foxmail.com" }
8
+ ]
5
9
  readme = "README.md"
6
- requires-python = ">=3.13"
10
+ requires-python = ">=3.12,<3.14"
11
+
7
12
  dependencies = [
8
13
  "fabricatio-core",
9
14
  "fabricatio-improve",
@@ -23,4 +28,10 @@ sources = ["python"]
23
28
  fabricatio-core = { workspace = true }
24
29
  fabricatio-improve = { workspace = true }
25
30
  fabricatio-judge = { workspace = true }
26
- fabricatio-capabilities = { workspace = true }
31
+ fabricatio-capabilities = { workspace = true }
32
+
33
+
34
+ [project.urls]
35
+ Homepage = "https://github.com/Whth/fabricatio"
36
+ Repository = "https://github.com/Whth/fabricatio"
37
+ Issues = "https://github.com/Whth/fabricatio/issues"
@@ -0,0 +1,146 @@
1
+ import argparse
2
+ import subprocess
3
+ import tomllib
4
+ from pathlib import Path
5
+ from typing import Optional, Tuple, List, Dict, Any
6
+
7
+ ROOT_DIR = Path("packages").resolve() # Default root directory
8
+ DIST = Path("dist").resolve()
9
+
10
+
11
+ def parse_pyproject(pyproject_path: Path) -> Optional[Tuple[str, str, Dict[str, Any]]]:
12
+ """Parses the pyproject.toml file and returns build backend and project name."""
13
+ try:
14
+ with pyproject_path.open("rb") as f:
15
+ config = tomllib.load(f)
16
+ build_system = config.get("build-system", {})
17
+ build_backend = build_system.get("build-backend", "")
18
+ project_name = config.get("project", {}).get("name")
19
+ if not project_name:
20
+ print(f"⚠️ Project name not found in {pyproject_path.parent.name}")
21
+ return None
22
+ return build_backend, project_name, config
23
+ except Exception as e:
24
+ print(f"⚠️ Failed to parse pyproject.toml in {pyproject_path.parent.name}: {e}")
25
+ return None
26
+
27
+
28
+ def build_command(project_name: str, entry: Path, build_backend: str) -> List[str]:
29
+ """Builds the command list based on the build backend."""
30
+ if build_backend == "maturin":
31
+ # The following line was present in the original code but is not valid Python.
32
+ # It appears to be a comment or a command meant for manual execution for a specific package.
33
+ # uvx --directory .\packages\fabricatio-core\ maturin publish --skip-existing
34
+ return [
35
+ ["uvx", "--project", project_name, "--directory", entry.as_posix(), "maturin", "develop", "--uv", "-r", ],
36
+
37
+ ["uvx", "--project", project_name, "--directory", entry.as_posix(),
38
+
39
+ "maturin", "build", "-r",
40
+ "--sdist", "-o", DIST.as_posix()]]
41
+ else:
42
+ # uvx --project fabricatio-judge --directory .\packages\fabricatio-judge\ uv build
43
+ return [["uvx", "--project", project_name, "--directory", entry.as_posix(), "uv",
44
+ "build"]] # Assuming uv publish expects the path to the package dir
45
+
46
+
47
+ def run_build_command(command: List[List[str]], project_name: str, entry: Path, build_backend: str) -> None:
48
+ """Runs the build command."""
49
+ for c in command:
50
+ print(f"🚀 Running command: {' '.join(c)}")
51
+ try:
52
+ subprocess.run(c, check=True)
53
+ print(f"✅ Successfully built {project_name}")
54
+ except subprocess.CalledProcessError as e:
55
+ print(f"❌ Build failed for {project_name}: {e}")
56
+ except FileNotFoundError:
57
+ print(f"❌ Command '{c[0]}' not found. Make sure it's installed and in your PATH.")
58
+
59
+
60
+ def _validate_project_entry(entry: Path) -> Optional[Path]:
61
+ """Validates if the entry is a directory and contains pyproject.toml."""
62
+ if not entry.is_dir():
63
+ return None
64
+ pyproject_path = entry / "pyproject.toml"
65
+ if not pyproject_path.is_file():
66
+ return None
67
+ return pyproject_path
68
+
69
+
70
+ def _build_project(project_name: str, entry: Path, build_backend: str) -> None:
71
+ """Builds the specified project."""
72
+ command = build_command(project_name, entry, build_backend)
73
+ run_build_command(command, project_name, entry, build_backend)
74
+
75
+
76
+ def _publish_project(project_name: str) -> None:
77
+ """Publishes the built packages for the project."""
78
+ for package_file in DIST.glob(f"{project_name.replace('-', '_')}*.*"):
79
+ if package_file.suffix in ('.whl', '.tar.gz'):
80
+ publish_command = ["uv", "publish", package_file.as_posix()]
81
+ print(f"🚀 Publishing: {' '.join(publish_command)}")
82
+ try:
83
+ subprocess.run(publish_command, check=True)
84
+ print(f"✅ Successfully published {package_file.name}")
85
+ except subprocess.CalledProcessError as e:
86
+ print(f"❌ Failed to publish {package_file.name}: {e}")
87
+ except FileNotFoundError:
88
+ print(f"❌ Command 'uv' not found. Make sure it's installed and in your PATH.")
89
+
90
+
91
+ def process_project(entry: Path, publish_enabled: bool) -> None:
92
+ """Processes a single project directory: validates, builds, and optionally publishes it."""
93
+ pyproject_path = _validate_project_entry(entry)
94
+ if not pyproject_path:
95
+ return
96
+
97
+ print(f"\n🔍 Checking project: {entry.name}")
98
+
99
+ parsed_info = parse_pyproject(pyproject_path)
100
+ if not parsed_info:
101
+ return
102
+
103
+ build_backend, project_name, _ = parsed_info
104
+ print(f"📦 Project: {project_name}, Build backend: {build_backend}")
105
+
106
+ _build_project(project_name, entry, build_backend)
107
+
108
+ if publish_enabled:
109
+ _publish_project(project_name)
110
+ else:
111
+ print(f"📦 Skipping publish for {project_name} as per configuration.")
112
+
113
+
114
+ def main():
115
+ parser = argparse.ArgumentParser(description="Build and optionally publish Python subpackages.")
116
+ parser.add_argument(
117
+ "--root-dir",
118
+ type=Path,
119
+ default=ROOT_DIR,
120
+ help="The root directory containing the subpackages.",
121
+ )
122
+ parser.add_argument(
123
+ "--no-publish",
124
+ action="store_false",
125
+ dest="publish",
126
+ help="Disable publishing of the built packages.",
127
+ )
128
+ parser.set_defaults(publish=True)
129
+
130
+ args = parser.parse_args()
131
+
132
+ root_dir = args.root_dir.resolve()
133
+ publish_enabled = args.publish
134
+
135
+ DIST.mkdir(parents=True, exist_ok=True)
136
+
137
+ if not root_dir.is_dir():
138
+ print(f"❌ Root directory '{root_dir}' not found.")
139
+ return
140
+
141
+ for entry in root_dir.iterdir():
142
+ process_project(entry, publish_enabled)
143
+
144
+
145
+ if __name__ == "__main__":
146
+ main()
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "fabricatio"
3
- version = "0.4.0"
3
+ version = "0.4.0-dev2"
4
4
  description = "A LLM multi-agent framework."
5
5
  readme = "README.md"
6
6
  license = { file = "LICENSE" }
@@ -2,9 +2,9 @@
2
2
 
3
3
  from typing import Set
4
4
 
5
- from fabricatio.models.tool import ToolBox
6
5
  from fabricatio.toolboxes.arithmetic import arithmetic_toolbox
7
6
  from fabricatio.toolboxes.fs import fs_toolbox
7
+ from fabricatio_core.models.tool import ToolBox
8
8
 
9
9
  basic_toolboxes: Set[ToolBox] = {arithmetic_toolbox}
10
10