fabricatio 0.2.3.dev2__cp312-cp312-win_amd64.whl → 0.2.4.dev0__cp312-cp312-win_amd64.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.
- fabricatio/__init__.py +10 -0
- fabricatio/_rust.cp312-win_amd64.pyd +0 -0
- fabricatio/actions/__init__.py +2 -2
- fabricatio/actions/article.py +127 -0
- fabricatio/capabilities/propose.py +55 -0
- fabricatio/capabilities/rag.py +181 -50
- fabricatio/capabilities/task.py +6 -23
- fabricatio/config.py +40 -2
- fabricatio/models/action.py +1 -0
- fabricatio/models/events.py +36 -0
- fabricatio/models/generic.py +158 -7
- fabricatio/models/kwargs_types.py +14 -0
- fabricatio/models/task.py +12 -30
- fabricatio/models/usages.py +103 -162
- fabricatio/models/utils.py +19 -0
- fabricatio/parser.py +34 -3
- fabricatio-0.2.4.dev0.data/scripts/tdown.exe +0 -0
- {fabricatio-0.2.3.dev2.dist-info → fabricatio-0.2.4.dev0.dist-info}/METADATA +40 -148
- fabricatio-0.2.4.dev0.dist-info/RECORD +37 -0
- fabricatio/actions/communication.py +0 -15
- fabricatio/actions/transmission.py +0 -23
- fabricatio-0.2.3.dev2.data/scripts/tdown.exe +0 -0
- fabricatio-0.2.3.dev2.dist-info/RECORD +0 -37
- {fabricatio-0.2.3.dev2.dist-info → fabricatio-0.2.4.dev0.dist-info}/WHEEL +0 -0
- {fabricatio-0.2.3.dev2.dist-info → fabricatio-0.2.4.dev0.dist-info}/licenses/LICENSE +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: fabricatio
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.4.dev0
|
4
4
|
Classifier: License :: OSI Approved :: MIT License
|
5
5
|
Classifier: Programming Language :: Rust
|
6
6
|
Classifier: Programming Language :: Python :: 3.12
|
@@ -11,7 +11,6 @@ Classifier: Typing :: Typed
|
|
11
11
|
Requires-Dist: appdirs>=1.4.4
|
12
12
|
Requires-Dist: asyncio>=3.4.3
|
13
13
|
Requires-Dist: asyncstdlib>=3.13.0
|
14
|
-
Requires-Dist: gitpython>=3.1.44
|
15
14
|
Requires-Dist: litellm>=1.60.0
|
16
15
|
Requires-Dist: loguru>=0.7.3
|
17
16
|
Requires-Dist: magika>=0.5.1
|
@@ -37,13 +36,14 @@ Project-URL: Homepage, https://github.com/Whth/fabricatio
|
|
37
36
|
Project-URL: Repository, https://github.com/Whth/fabricatio
|
38
37
|
Project-URL: Issues, https://github.com/Whth/fabricatio/issues
|
39
38
|
|
40
|
-
|
41
39
|
# Fabricatio
|
42
40
|
|
43
41
|

|
44
42
|

|
45
43
|

|
46
44
|
|
45
|
+
## Overview
|
46
|
+
|
47
47
|
Fabricatio is a Python library designed for building LLM (Large Language Model) applications using an event-based agent structure. It integrates Rust for performance-critical tasks, utilizes Handlebars for templating, and employs PyO3 for Python bindings.
|
48
48
|
|
49
49
|
## Features
|
@@ -73,6 +73,7 @@ cd fabricatio
|
|
73
73
|
uv --with-editable . maturin develop --uv -r
|
74
74
|
```
|
75
75
|
|
76
|
+
|
76
77
|
### Building Distribution
|
77
78
|
|
78
79
|
For production builds:
|
@@ -82,24 +83,21 @@ For production builds:
|
|
82
83
|
make bdist
|
83
84
|
```
|
84
85
|
|
86
|
+
|
85
87
|
This will generate distribution files in the `dist` directory.
|
86
88
|
|
87
89
|
## Usage
|
88
90
|
|
89
91
|
### Basic Example
|
90
92
|
|
91
|
-
Below are some basic examples demonstrating how to use Fabricatio for different purposes.
|
92
|
-
|
93
93
|
#### Simple Hello World Program
|
94
94
|
|
95
95
|
```python
|
96
96
|
import asyncio
|
97
|
-
from fabricatio import Action, Role, Task, logger
|
98
|
-
|
97
|
+
from fabricatio import Action, Role, Task, logger, WorkFlow
|
98
|
+
from typing import Any
|
99
99
|
|
100
100
|
class Hello(Action):
|
101
|
-
"""Action that says hello."""
|
102
|
-
|
103
101
|
name: str = "hello"
|
104
102
|
output_key: str = "task_output"
|
105
103
|
|
@@ -108,24 +106,24 @@ class Hello(Action):
|
|
108
106
|
logger.info("executing talk action")
|
109
107
|
return ret
|
110
108
|
|
111
|
-
|
112
109
|
async def main() -> None:
|
113
|
-
"""Main function."""
|
114
110
|
role = Role(
|
115
|
-
name="talker",
|
116
|
-
description="talker role",
|
111
|
+
name="talker",
|
112
|
+
description="talker role",
|
117
113
|
registry={Task.pending_label: WorkFlow(name="talk", steps=(Hello,))}
|
118
114
|
)
|
119
115
|
|
120
|
-
task = Task(name="say hello",
|
116
|
+
task = Task(name="say hello", goals="say hello", description="say hello to the world")
|
121
117
|
result = await task.delegate()
|
122
118
|
logger.success(f"Result: {result}")
|
123
119
|
|
124
|
-
|
125
120
|
if __name__ == "__main__":
|
126
121
|
asyncio.run(main())
|
127
122
|
```
|
128
123
|
|
124
|
+
|
125
|
+
### Advanced Examples
|
126
|
+
|
129
127
|
#### Writing and Dumping Code
|
130
128
|
|
131
129
|
```python
|
@@ -134,21 +132,14 @@ from fabricatio import Action, Event, PythonCapture, Role, Task, ToolBox, WorkFl
|
|
134
132
|
|
135
133
|
|
136
134
|
class WriteCode(Action):
|
137
|
-
"""Action that writes code based on a prompt."""
|
138
|
-
|
139
135
|
name: str = "write code"
|
140
136
|
output_key: str = "source_code"
|
141
137
|
|
142
138
|
async def _execute(self, task_input: Task[str], **_) -> str:
|
143
|
-
return await self.aask_validate(
|
144
|
-
task_input.briefing,
|
145
|
-
validator=PythonCapture.capture,
|
146
|
-
)
|
139
|
+
return await self.aask_validate(task_input.briefing, validator=PythonCapture.capture)
|
147
140
|
|
148
141
|
|
149
142
|
class DumpCode(Action):
|
150
|
-
"""Action that dumps code to the file system."""
|
151
|
-
|
152
143
|
name: str = "dump code"
|
153
144
|
description: str = "Dump code to file system"
|
154
145
|
toolboxes: set[ToolBox] = {fs_toolbox}
|
@@ -160,20 +151,18 @@ class DumpCode(Action):
|
|
160
151
|
|
161
152
|
|
162
153
|
async def main() -> None:
|
163
|
-
"""Main function."""
|
164
154
|
role = Role(
|
165
155
|
name="Coder",
|
166
156
|
description="A python coder who can write and document code",
|
167
157
|
registry={
|
168
158
|
Event.instantiate_from("coding.*").push("pending"): WorkFlow(
|
169
159
|
name="write code", steps=(WriteCode, DumpCode)
|
170
|
-
)
|
171
|
-
}
|
160
|
+
)
|
161
|
+
}
|
172
162
|
)
|
173
163
|
|
174
164
|
prompt = "write a Python CLI app which prints 'hello world' n times with detailed Google-style docstring. Write the source code to `cli.py`."
|
175
|
-
|
176
|
-
proposed_task = await role.propose(prompt)
|
165
|
+
proposed_task = await role.propose_task(prompt)
|
177
166
|
path = await proposed_task.move_to("coding").delegate()
|
178
167
|
logger.success(f"Code Path: {path}")
|
179
168
|
|
@@ -182,112 +171,8 @@ if __name__ == "__main__":
|
|
182
171
|
asyncio.run(main())
|
183
172
|
```
|
184
173
|
|
185
|
-
#### Proposing Tasks
|
186
|
-
|
187
|
-
```python
|
188
|
-
import asyncio
|
189
|
-
from typing import Any
|
190
|
-
|
191
|
-
from fabricatio import Action, Role, Task, WorkFlow, logger
|
192
|
-
|
193
|
-
|
194
|
-
class WriteDocumentation(Action):
|
195
|
-
"""Action that generates documentation for the code in markdown format."""
|
196
|
-
|
197
|
-
name: str = "write documentation"
|
198
|
-
description: str = "Write detailed documentation for the provided code."
|
199
|
-
output_key: str = "task_output"
|
200
|
-
|
201
|
-
async def _execute(self, task_input: Task[str], **_) -> str:
|
202
|
-
return await self.aask(task_input.briefing)
|
203
|
-
|
204
|
-
|
205
|
-
async def main() -> None:
|
206
|
-
"""Main function."""
|
207
|
-
role = Role(
|
208
|
-
name="Documenter",
|
209
|
-
description="Role responsible for writing documentation.",
|
210
|
-
registry={
|
211
|
-
"doc.*": WorkFlow(name="write documentation", steps=(WriteDocumentation,))
|
212
|
-
}
|
213
|
-
)
|
214
|
-
|
215
|
-
prompt = "write a Rust clap CLI that downloads an HTML page"
|
216
|
-
proposed_task = await role.propose(prompt)
|
217
|
-
documentation = await proposed_task.move_to("doc").delegate()
|
218
|
-
logger.success(f"Documentation:\n{documentation}")
|
219
|
-
|
220
|
-
|
221
|
-
if __name__ == "__main__":
|
222
|
-
asyncio.run(main())
|
223
|
-
```
|
224
|
-
|
225
|
-
#### Complex Workflow Handling
|
226
|
-
|
227
|
-
```python
|
228
|
-
import asyncio
|
229
|
-
from fabricatio import Action, Event, Role, Task, WorkFlow, logger
|
230
|
-
|
231
|
-
|
232
|
-
class WriteCode(Action):
|
233
|
-
"""Action that writes code based on a prompt."""
|
234
|
-
|
235
|
-
name: str = "write code"
|
236
|
-
output_key: str = "source_code"
|
237
|
-
|
238
|
-
async def _execute(self, task_input: Task[str], **_) -> str:
|
239
|
-
return await self.aask_validate(
|
240
|
-
task_input.briefing,
|
241
|
-
validator=PythonCapture.capture,
|
242
|
-
)
|
243
|
-
|
244
|
-
|
245
|
-
class WriteDocumentation(Action):
|
246
|
-
"""Action that generates documentation for the code in markdown format."""
|
247
|
-
|
248
|
-
name: str = "write documentation"
|
249
|
-
description: str = "Write detailed documentation for the provided code."
|
250
|
-
output_key: str = "task_output"
|
251
|
-
|
252
|
-
async def _execute(self, task_input: Task[str], **_) -> str:
|
253
|
-
return await self.aask(task_input.briefing)
|
254
|
-
|
255
|
-
|
256
|
-
async def main() -> None:
|
257
|
-
"""Main function."""
|
258
|
-
role = Role(
|
259
|
-
name="Developer",
|
260
|
-
description="A developer who can write code and documentation.",
|
261
|
-
registry={
|
262
|
-
Event.instantiate_from("coding.*").push("pending"): WorkFlow(
|
263
|
-
name="write code", steps=(WriteCode,)
|
264
|
-
),
|
265
|
-
Event.instantiate_from("doc.*").push("pending"): WorkFlow(
|
266
|
-
name="write documentation", steps=(WriteDocumentation,)
|
267
|
-
),
|
268
|
-
}
|
269
|
-
)
|
270
|
-
|
271
|
-
# Propose a coding task
|
272
|
-
code_task_prompt = "write a Python CLI app which adds numbers from a file."
|
273
|
-
proposed_task = await role.propose(code_task_prompt)
|
274
|
-
code = await proposed_task.move_to("coding").delegate()
|
275
|
-
logger.success(f"Code:\n{code}")
|
276
|
-
|
277
|
-
# Propose a documentation task
|
278
|
-
doc_task_prompt = f"{code}\n\nwrite Readme.md file for the above code."
|
279
|
-
proposed_doc_task = await role.propose(doc_task_prompt)
|
280
|
-
documentation = await proposed_doc_task.move_to("doc").delegate()
|
281
|
-
logger.success(f"Documentation:\n{documentation}")
|
282
|
-
|
283
|
-
|
284
|
-
if __name__ == "__main__":
|
285
|
-
asyncio.run(main())
|
286
|
-
```
|
287
|
-
|
288
|
-
### Advanced Examples
|
289
174
|
|
290
|
-
|
175
|
+
### Template Management and Rendering
|
291
176
|
|
292
177
|
```python
|
293
178
|
from fabricatio._rust_instances import template_manager
|
@@ -303,7 +188,8 @@ rendered_template = template_manager.render_template(template_name, data)
|
|
303
188
|
print(rendered_template)
|
304
189
|
```
|
305
190
|
|
306
|
-
|
191
|
+
|
192
|
+
### Handling Security Vulnerabilities
|
307
193
|
|
308
194
|
```python
|
309
195
|
from fabricatio.models.usages import ToolBoxUsage
|
@@ -314,17 +200,18 @@ toolbox_usage = ToolBoxUsage()
|
|
314
200
|
async def handle_security_vulnerabilities():
|
315
201
|
task = Task(
|
316
202
|
name="Security Check",
|
317
|
-
|
203
|
+
goals=["Identify security vulnerabilities"],
|
318
204
|
description="Perform a thorough security review on the project.",
|
319
205
|
dependencies=["./src/main.py"]
|
320
206
|
)
|
321
|
-
|
207
|
+
|
322
208
|
vulnerabilities = await toolbox_usage.gather_tools_fine_grind(task)
|
323
209
|
for vulnerability in vulnerabilities:
|
324
210
|
print(f"Found vulnerability: {vulnerability.name}")
|
325
211
|
```
|
326
212
|
|
327
|
-
|
213
|
+
|
214
|
+
### Managing CTF Challenges
|
328
215
|
|
329
216
|
```python
|
330
217
|
import asyncio
|
@@ -337,19 +224,21 @@ toolbox_usage = ToolBoxUsage()
|
|
337
224
|
async def solve_ctf_challenge(challenge_name: str, challenge_description: str, files: list[str]):
|
338
225
|
task = Task(
|
339
226
|
name=challenge_name,
|
340
|
-
|
227
|
+
goals=[f"Solve {challenge_name} challenge"],
|
341
228
|
description=challenge_description,
|
342
229
|
dependencies=files
|
343
230
|
)
|
344
|
-
|
231
|
+
|
345
232
|
solution = await toolbox_usage.gather_tools_fine_grind(task)
|
346
233
|
print(f"Challenge Solved: {solution}")
|
347
234
|
|
348
235
|
if __name__ == "__main__":
|
349
|
-
asyncio.run(
|
236
|
+
asyncio.run(
|
237
|
+
solve_ctf_challenge("Binary Exploitation", "CTF Binary Exploitation Challenge", ["./challenges/binary_exploit"]))
|
350
238
|
```
|
351
239
|
|
352
|
-
|
240
|
+
|
241
|
+
## Configuration
|
353
242
|
|
354
243
|
The configuration for Fabricatio is managed via environment variables or TOML files. The default configuration file (`config.toml`) can be overridden by specifying a custom path.
|
355
244
|
|
@@ -370,7 +259,8 @@ stream = false
|
|
370
259
|
max_tokens = 8192
|
371
260
|
```
|
372
261
|
|
373
|
-
|
262
|
+
|
263
|
+
## Development Setup
|
374
264
|
|
375
265
|
To set up a development environment for Fabricatio:
|
376
266
|
|
@@ -380,22 +270,26 @@ To set up a development environment for Fabricatio:
|
|
380
270
|
cd fabricatio
|
381
271
|
```
|
382
272
|
|
273
|
+
|
383
274
|
2. **Install Dependencies**:
|
384
275
|
```bash
|
385
276
|
uv --with-editable . maturin develop --uv -r
|
386
277
|
```
|
387
278
|
|
279
|
+
|
388
280
|
3. **Run Tests**:
|
389
281
|
```bash
|
390
282
|
make test
|
391
283
|
```
|
392
284
|
|
285
|
+
|
393
286
|
4. **Build Documentation**:
|
394
287
|
```bash
|
395
288
|
make docs
|
396
289
|
```
|
397
290
|
|
398
|
-
|
291
|
+
|
292
|
+
## Contributing
|
399
293
|
|
400
294
|
Contributions are welcome! Please follow these guidelines when contributing:
|
401
295
|
|
@@ -405,15 +299,13 @@ Contributions are welcome! Please follow these guidelines when contributing:
|
|
405
299
|
4. Push to the branch (`git push origin feature/new-feature`).
|
406
300
|
5. Create a new Pull Request.
|
407
301
|
|
408
|
-
|
302
|
+
## License
|
409
303
|
|
410
304
|
Fabricatio is licensed under the MIT License. See [LICENSE](LICENSE) for more details.
|
411
305
|
|
412
|
-
|
306
|
+
## Acknowledgments
|
413
307
|
|
414
308
|
Special thanks to the contributors and maintainers of:
|
415
309
|
- [PyO3](https://github.com/PyO3/pyo3)
|
416
310
|
- [Maturin](https://github.com/PyO3/maturin)
|
417
|
-
- [Handlebars.rs](https://github.com/sunng87/handlebars-rust)
|
418
|
-
|
419
|
-
|
311
|
+
- [Handlebars.rs](https://github.com/sunng87/handlebars-rust)
|
@@ -0,0 +1,37 @@
|
|
1
|
+
fabricatio-0.2.4.dev0.dist-info/METADATA,sha256=1sPsuFY-rBXRPE-zNVr6RXMNQ_f9q0idfNN3aUVG6Tw,8861
|
2
|
+
fabricatio-0.2.4.dev0.dist-info/WHEEL,sha256=tpW5AN9B-9qsM9WW2FXG2r193YXiqexDadpKp0A2daI,96
|
3
|
+
fabricatio-0.2.4.dev0.dist-info/licenses/LICENSE,sha256=do7J7EiCGbq0QPbMAL_FqLYufXpHnCnXBOuqVPwSV8Y,1088
|
4
|
+
fabricatio/actions/article.py,sha256=WEKGqSx7tAhCMB0ziHVlDIYQywnUAH0R_Ha49xuJSdY,5483
|
5
|
+
fabricatio/actions/__init__.py,sha256=CjlbRaRqqKWPxqZEtk7tQt3Mul17CY9O4alo6VjWGNk,130
|
6
|
+
fabricatio/capabilities/propose.py,sha256=nahXjB6_nP0Fru880oh_9oINrjrL0Qs-SLHA-d3CFUE,1769
|
7
|
+
fabricatio/capabilities/rag.py,sha256=paq2zUOfw6whIBFkKDo1Kg5Ft5YXgWiJBNKq-6uGhuU,13295
|
8
|
+
fabricatio/capabilities/rating.py,sha256=zmTUvsUfxFgovRQzy4djL2zKRYTHmN6JY7A4lyT5uVQ,14907
|
9
|
+
fabricatio/capabilities/task.py,sha256=s6FiC9Wg_l-qSa2LgsoKV9f6wXZN6Q_FlWn3XbSnrys,4618
|
10
|
+
fabricatio/config.py,sha256=yPJjrGhvoWyXfLBTJp2pMvHt9F-0uskE-va7QDo0rxI,13525
|
11
|
+
fabricatio/core.py,sha256=VQ_JKgUGIy2gZ8xsTBZCdr_IP7wC5aPg0_bsOmjQ588,6458
|
12
|
+
fabricatio/decorators.py,sha256=uzsP4tFKQNjDHBkofsjjoJA0IUAaYOtt6YVedoyOqlo,6551
|
13
|
+
fabricatio/fs/curd.py,sha256=faMstgGUiQ4k2AW3OXfvvWWTldTtKXco7QINYaMjmyA,3981
|
14
|
+
fabricatio/fs/readers.py,sha256=Pz1-cdZYtmqr032dsroImlkFXAd0kCYY_9qVpD4UrG4,1045
|
15
|
+
fabricatio/fs/__init__.py,sha256=lWcKYg0v3mv2LnnSegOQaTtlVDODU0vtw_s6iKU5IqQ,122
|
16
|
+
fabricatio/journal.py,sha256=siqimKF0M_QaaOCMxtjr_BJVNyUIAQWILzE9Q4T6-7c,781
|
17
|
+
fabricatio/models/action.py,sha256=VhSXPmHjICaypz6qB-RE7dzvdrL9lbvhY4og32Q-DPI,5939
|
18
|
+
fabricatio/models/events.py,sha256=pt-WkFhhA5SXmp6-3Vb_o_7I5xbKoTCJ22GAK7YYwpA,4101
|
19
|
+
fabricatio/models/generic.py,sha256=_9GawiKlNMumLH0DqjSkG-ZJ2oKa-8Vcyi2yw-R6lUk,10659
|
20
|
+
fabricatio/models/kwargs_types.py,sha256=Xhy5LcTB1oWBGVGipLf5y_dTb7tBzMO5QAQdEfZeI9I,1786
|
21
|
+
fabricatio/models/role.py,sha256=gYvleTeKUGDUNKPAC5B0EPMLC4jZ4vHsFHmHiVXkU6c,1830
|
22
|
+
fabricatio/models/task.py,sha256=BRE3XBQXTXH7UHsJDN7UzxIBRQbDVf7T4a00_111inw,10996
|
23
|
+
fabricatio/models/tool.py,sha256=WTFnpF6xZ1nJbmIOonLsGQcM-kkDCeZiAFqyil9xg2U,6988
|
24
|
+
fabricatio/models/usages.py,sha256=wLKzJ6dzik6RBgyK-sLdmzginPeuBOcsB7RQXO0Nvjo,25804
|
25
|
+
fabricatio/models/utils.py,sha256=QI3bYrKBbzLbKvyzVrZXGcWq3trOOTE-hQAC_WNvjMg,4457
|
26
|
+
fabricatio/parser.py,sha256=BKYaXieHveo99xFay8YyYBa9Uo1-DwCZ-Fzx-k_CMeI,5051
|
27
|
+
fabricatio/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
28
|
+
fabricatio/toolboxes/arithmetic.py,sha256=WLqhY-Pikv11Y_0SGajwZx3WhsLNpHKf9drzAqOf_nY,1369
|
29
|
+
fabricatio/toolboxes/fs.py,sha256=YkNgon5-bvCiPVEND9971W-6wj8btKNL6nGry2otn9I,498
|
30
|
+
fabricatio/toolboxes/task.py,sha256=kU4a501awIDV7GwNDuSlK3_Ym-5OhCp5sS-insTmUmQ,269
|
31
|
+
fabricatio/toolboxes/__init__.py,sha256=b13KmASO8q5fBLwew964fn9oH86ER5g-S1PgA4fZ_xs,482
|
32
|
+
fabricatio/_rust.pyi,sha256=0wCqtwWkVxxoqprvk8T27T8QYKIAKHS7xgsmdMNjQKc,1756
|
33
|
+
fabricatio/_rust_instances.py,sha256=dl0-yZ4UvT5g20tQgnPJpmqtkjFGXNG_YK4eLfi_ugQ,279
|
34
|
+
fabricatio/__init__.py,sha256=cj0E_rYiyGckvMy-hiXSKxNWwF-drkj4NGOXq5eZHuw,1330
|
35
|
+
fabricatio/_rust.cp312-win_amd64.pyd,sha256=6jqod91J-z0dk_plffA1H5DPttEA1Ksfy5ZFM-87GQE,1256448
|
36
|
+
fabricatio-0.2.4.dev0.data/scripts/tdown.exe,sha256=7sUpScFur_OgeyVJKmyP4HHzRk2pnPHVAtG8VAUNlNE,3395584
|
37
|
+
fabricatio-0.2.4.dev0.dist-info/RECORD,,
|
@@ -1,15 +0,0 @@
|
|
1
|
-
"""Actions that involve communication with the user."""
|
2
|
-
|
3
|
-
from fabricatio.models.action import Action
|
4
|
-
from fabricatio.models.task import Task
|
5
|
-
|
6
|
-
|
7
|
-
class Examining(Action):
|
8
|
-
"""Action that examines the input data."""
|
9
|
-
|
10
|
-
name: str = "talk"
|
11
|
-
output_key: str = "examine_pass"
|
12
|
-
|
13
|
-
async def _execute(self, exam_target: Task[str], to_examine: str, **_) -> bool:
|
14
|
-
"""Examine the input data."""
|
15
|
-
# TODO
|
@@ -1,23 +0,0 @@
|
|
1
|
-
"""Actions for transmitting tasks to targets."""
|
2
|
-
|
3
|
-
from typing import List
|
4
|
-
|
5
|
-
from fabricatio.journal import logger
|
6
|
-
from fabricatio.models.action import Action
|
7
|
-
from fabricatio.models.events import EventLike
|
8
|
-
from fabricatio.models.task import Task
|
9
|
-
|
10
|
-
|
11
|
-
class PublishTask(Action):
|
12
|
-
"""An action that publishes a task to a list of targets."""
|
13
|
-
|
14
|
-
name: str = "publish_task"
|
15
|
-
"""The name of the action."""
|
16
|
-
description: str = "Publish a task to a list of targets."
|
17
|
-
"""The description of the action."""
|
18
|
-
|
19
|
-
async def _execute(self, send_targets: List[EventLike], send_task: Task, **_) -> None:
|
20
|
-
"""Execute the action by sending the task to the specified targets."""
|
21
|
-
logger.info(f"Sending task {send_task.name} to {send_targets}")
|
22
|
-
for target in send_targets:
|
23
|
-
await send_task.move_to(target).publish()
|
Binary file
|
@@ -1,37 +0,0 @@
|
|
1
|
-
fabricatio-0.2.3.dev2.dist-info/METADATA,sha256=BlVLqYv59JMHHleZ0q386UhyragcQ3iZbMXonozLX3c,12339
|
2
|
-
fabricatio-0.2.3.dev2.dist-info/WHEEL,sha256=tpW5AN9B-9qsM9WW2FXG2r193YXiqexDadpKp0A2daI,96
|
3
|
-
fabricatio-0.2.3.dev2.dist-info/licenses/LICENSE,sha256=do7J7EiCGbq0QPbMAL_FqLYufXpHnCnXBOuqVPwSV8Y,1088
|
4
|
-
fabricatio/actions/communication.py,sha256=NZxIIncKgJSDyBrqNebUtH_haqtxHa8ld2TZxT3CMdU,429
|
5
|
-
fabricatio/actions/transmission.py,sha256=xpvKqbXqgpi1BWy-vUUvmd8NZ1GhRNfsYUBp-l2jLyk,862
|
6
|
-
fabricatio/actions/__init__.py,sha256=eFmFVPQvtNgFynIXBVr3eP-vWQDWCPng60YY5LXvZgg,115
|
7
|
-
fabricatio/capabilities/rag.py,sha256=WeUn-7wppyISbmNpm4flogzUZrCnrJ5iQYNjepZpdww,6954
|
8
|
-
fabricatio/capabilities/rating.py,sha256=zmTUvsUfxFgovRQzy4djL2zKRYTHmN6JY7A4lyT5uVQ,14907
|
9
|
-
fabricatio/capabilities/task.py,sha256=d2xtrwQxXWI40UskQCR5YhHarY7ST0ppr8TjY12uWQE,5327
|
10
|
-
fabricatio/config.py,sha256=6_cpyGu87NmuPC2Kc0fq_cwOogH3fjXTILiDY7poWi4,12041
|
11
|
-
fabricatio/core.py,sha256=VQ_JKgUGIy2gZ8xsTBZCdr_IP7wC5aPg0_bsOmjQ588,6458
|
12
|
-
fabricatio/decorators.py,sha256=uzsP4tFKQNjDHBkofsjjoJA0IUAaYOtt6YVedoyOqlo,6551
|
13
|
-
fabricatio/fs/curd.py,sha256=faMstgGUiQ4k2AW3OXfvvWWTldTtKXco7QINYaMjmyA,3981
|
14
|
-
fabricatio/fs/readers.py,sha256=Pz1-cdZYtmqr032dsroImlkFXAd0kCYY_9qVpD4UrG4,1045
|
15
|
-
fabricatio/fs/__init__.py,sha256=lWcKYg0v3mv2LnnSegOQaTtlVDODU0vtw_s6iKU5IqQ,122
|
16
|
-
fabricatio/journal.py,sha256=siqimKF0M_QaaOCMxtjr_BJVNyUIAQWILzE9Q4T6-7c,781
|
17
|
-
fabricatio/models/action.py,sha256=NpklAVUHYO5JIY9YLwYowZ-U8R9CFf5aC10DhLF7gxQ,5924
|
18
|
-
fabricatio/models/events.py,sha256=mrihNEFgQ5o7qFWja1z_qX8dnaTLwPBoJdVlzxQV5oM,2719
|
19
|
-
fabricatio/models/generic.py,sha256=WEjZ96rTyBjaBjkM6e8E4Pg_Naot4xWRvGJteqBiCCI,5133
|
20
|
-
fabricatio/models/kwargs_types.py,sha256=a-e7rdMZJi8xTBL_RLmTC9OPzI-Js7rlS689PR03VvA,1401
|
21
|
-
fabricatio/models/role.py,sha256=gYvleTeKUGDUNKPAC5B0EPMLC4jZ4vHsFHmHiVXkU6c,1830
|
22
|
-
fabricatio/models/task.py,sha256=ip6VeOV7vgXqhiQFOCjVl3hzc6lgdhfyvxbBuSz2-C0,11529
|
23
|
-
fabricatio/models/tool.py,sha256=WTFnpF6xZ1nJbmIOonLsGQcM-kkDCeZiAFqyil9xg2U,6988
|
24
|
-
fabricatio/models/usages.py,sha256=bzsTDrAekiQyIwKeWds5YdgsXk8qiZkD7OZdno1Q_Ck,28213
|
25
|
-
fabricatio/models/utils.py,sha256=mXea76bd4r2jy_zx74GM4t5kCvkMu0JTOaw_VGvTCxk,3952
|
26
|
-
fabricatio/parser.py,sha256=uLabsvF07wRKW1PoTGuGEENCx3P4mhmuO8JkmOEkKko,3522
|
27
|
-
fabricatio/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
28
|
-
fabricatio/toolboxes/arithmetic.py,sha256=WLqhY-Pikv11Y_0SGajwZx3WhsLNpHKf9drzAqOf_nY,1369
|
29
|
-
fabricatio/toolboxes/fs.py,sha256=YkNgon5-bvCiPVEND9971W-6wj8btKNL6nGry2otn9I,498
|
30
|
-
fabricatio/toolboxes/task.py,sha256=kU4a501awIDV7GwNDuSlK3_Ym-5OhCp5sS-insTmUmQ,269
|
31
|
-
fabricatio/toolboxes/__init__.py,sha256=b13KmASO8q5fBLwew964fn9oH86ER5g-S1PgA4fZ_xs,482
|
32
|
-
fabricatio/_rust.pyi,sha256=0wCqtwWkVxxoqprvk8T27T8QYKIAKHS7xgsmdMNjQKc,1756
|
33
|
-
fabricatio/_rust_instances.py,sha256=dl0-yZ4UvT5g20tQgnPJpmqtkjFGXNG_YK4eLfi_ugQ,279
|
34
|
-
fabricatio/__init__.py,sha256=opIrN8lGyT-h2If4Qez0bRuWBa3uIT9GsM9CZy7_XJ0,1100
|
35
|
-
fabricatio/_rust.cp312-win_amd64.pyd,sha256=wJkACEnysxtUfMBOwQ3851hSYNy1HOtY9vSIepLzEFg,1272320
|
36
|
-
fabricatio-0.2.3.dev2.data/scripts/tdown.exe,sha256=A9eIQbGxwDhpQ0gYqtEHA4Ms-LakyYkSkjiNnccvfYY,3398144
|
37
|
-
fabricatio-0.2.3.dev2.dist-info/RECORD,,
|
File without changes
|
File without changes
|