praisonAI 2.3.85__tar.gz → 2.3.87__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.
- {praisonai-2.3.85 → praisonai-2.3.87}/PKG-INFO +2 -2
- {praisonai-2.3.85 → praisonai-2.3.87}/PraisonAI.egg-info/PKG-INFO +2 -2
- {praisonai-2.3.85 → praisonai-2.3.87}/PraisonAI.egg-info/requires.txt +1 -1
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/skills.py +46 -29
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/deploy.py +1 -1
- praisonai-2.3.87/praisonai/version.py +1 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/pyproject.toml +1 -1
- praisonai-2.3.85/praisonai/version.py +0 -1
- {praisonai-2.3.85 → praisonai-2.3.87}/PraisonAI.egg-info/SOURCES.txt +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/PraisonAI.egg-info/dependency_links.txt +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/PraisonAI.egg-info/entry_points.txt +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/PraisonAI.egg-info/top_level.txt +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/README.md +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/__init__.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/__main__.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/agent_scheduler.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/agents_generator.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/api/call.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/auto.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/chainlit_ui.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/__init__.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/__init__.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/agent_scheduler.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/agents.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/at_mentions.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/auto_memory.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/autonomy_mode.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/base.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/compare.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/cost_tracker.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/eval.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/external_agents.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/fast_context.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/flow_display.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/git_integration.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/guardrail.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/handoff.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/image.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/interactive_tui.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/knowledge.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/mcp.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/message_queue.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/metrics.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/n8n.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/profile.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/profiling.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/repo_map.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/router.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/sandbox_executor.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/session.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/slash_commands.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/telemetry.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/todo.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/tools.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/features/workflow.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/main.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/cli/schedule_cli.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/code/__init__.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/code/agent_tools.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/code/diff/__init__.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/code/diff/diff_strategy.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/code/tools/__init__.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/code/tools/apply_diff.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/code/tools/execute_command.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/code/tools/list_files.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/code/tools/read_file.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/code/tools/search_replace.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/code/tools/write_file.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/code/utils/__init__.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/code/utils/file_utils.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/code/utils/ignore_utils.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/code/utils/text_utils.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/inbuilt_tools/__init__.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/inbuilt_tools/autogen_tools.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/inc/__init__.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/inc/config.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/inc/models.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/integrations/__init__.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/integrations/base.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/integrations/claude_code.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/integrations/codex_cli.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/integrations/cursor_cli.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/integrations/gemini_cli.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/profiler.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/scheduler/__init__.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/scheduler/agent_scheduler.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/scheduler/base.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/scheduler/daemon_manager.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/scheduler/state_manager.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/scheduler/yaml_loader.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/scheduler.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/setup/__init__.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/setup/build.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/setup/post_install.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/setup/setup_conda_env.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/setup.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/test.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/train.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/train_vision.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/ui/agents.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/ui/callbacks.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/ui/chat.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/ui/code.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/ui/colab.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/ui/colab_chainlit.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/ui/components/aicoder.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/ui/context.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/ui/database_config.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/ui/db.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/ui/realtime.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/ui/realtimeclient/__init__.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/ui/realtimeclient/tools.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/ui/sql_alchemy.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/praisonai/upload_vision.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/setup.cfg +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/tests/test.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/tests/test_agents_playbook.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/tests/test_approval_system.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/tests/test_basic.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/tests/test_cli_features.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/tests/test_custom_tools_fix.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/tests/test_double_api_fix.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/tests/test_n8n_integration.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/tests/test_phase2_refactor.py +0 -0
- {praisonai-2.3.85 → praisonai-2.3.87}/tests/test_runner.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PraisonAI
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.87
|
|
4
4
|
Summary: PraisonAI is an AI Agents Framework with Self Reflection. PraisonAI application combines PraisonAI Agents, AutoGen, and CrewAI into a low-code solution for building and managing multi-agent LLM systems, focusing on simplicity, customisation, and efficient human-agent collaboration.
|
|
5
5
|
Author: Mervin Praison
|
|
6
6
|
License: MIT
|
|
@@ -11,7 +11,7 @@ Description-Content-Type: text/markdown
|
|
|
11
11
|
Requires-Dist: rich>=13.7
|
|
12
12
|
Requires-Dist: markdown>=3.5
|
|
13
13
|
Requires-Dist: pyparsing>=3.0.0
|
|
14
|
-
Requires-Dist: praisonaiagents>=0.1.
|
|
14
|
+
Requires-Dist: praisonaiagents>=0.1.27
|
|
15
15
|
Requires-Dist: python-dotenv>=0.19.0
|
|
16
16
|
Requires-Dist: instructor>=1.3.3
|
|
17
17
|
Requires-Dist: PyYAML>=6.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PraisonAI
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.87
|
|
4
4
|
Summary: PraisonAI is an AI Agents Framework with Self Reflection. PraisonAI application combines PraisonAI Agents, AutoGen, and CrewAI into a low-code solution for building and managing multi-agent LLM systems, focusing on simplicity, customisation, and efficient human-agent collaboration.
|
|
5
5
|
Author: Mervin Praison
|
|
6
6
|
License: MIT
|
|
@@ -11,7 +11,7 @@ Description-Content-Type: text/markdown
|
|
|
11
11
|
Requires-Dist: rich>=13.7
|
|
12
12
|
Requires-Dist: markdown>=3.5
|
|
13
13
|
Requires-Dist: pyparsing>=3.0.0
|
|
14
|
-
Requires-Dist: praisonaiagents>=0.1.
|
|
14
|
+
Requires-Dist: praisonaiagents>=0.1.27
|
|
15
15
|
Requires-Dist: python-dotenv>=0.19.0
|
|
16
16
|
Requires-Dist: instructor>=1.3.3
|
|
17
17
|
Requires-Dist: PyYAML>=6.0
|
|
@@ -165,14 +165,14 @@ class SkillsHandler:
|
|
|
165
165
|
|
|
166
166
|
(skill_dir / "SKILL.md").write_text(skill_md_content)
|
|
167
167
|
|
|
168
|
-
# Generate scripts/
|
|
168
|
+
# Generate scripts/skill.py if requested or AI provided it
|
|
169
169
|
if generate_script or (ai_content and ai_content.get("skill_py")):
|
|
170
170
|
script_content = (ai_content or {}).get("skill_py") or self._generate_template_script(name, description)
|
|
171
171
|
# Strip any remaining code blocks from script content
|
|
172
172
|
script_content = self._strip_code_blocks(script_content)
|
|
173
|
-
(skill_dir / "scripts" / "
|
|
173
|
+
(skill_dir / "scripts" / "skill.py").write_text(script_content)
|
|
174
174
|
if self.verbose:
|
|
175
|
-
print(" - scripts/
|
|
175
|
+
print(" - scripts/skill.py")
|
|
176
176
|
else:
|
|
177
177
|
(skill_dir / "scripts" / ".gitkeep").write_text("")
|
|
178
178
|
|
|
@@ -207,18 +207,18 @@ class SkillsHandler:
|
|
|
207
207
|
script_section = f"""
|
|
208
208
|
## Script Usage
|
|
209
209
|
|
|
210
|
-
This skill includes a Python script at `scripts/
|
|
210
|
+
This skill includes a Python script at `scripts/skill.py` that provides the core functionality.
|
|
211
211
|
|
|
212
212
|
### Running the Script
|
|
213
213
|
|
|
214
214
|
```bash
|
|
215
|
-
python scripts/
|
|
215
|
+
python scripts/skill.py <input>
|
|
216
216
|
```
|
|
217
217
|
|
|
218
218
|
### Using as a Module
|
|
219
219
|
|
|
220
220
|
```python
|
|
221
|
-
from scripts.
|
|
221
|
+
from scripts.skill import {func_name}
|
|
222
222
|
|
|
223
223
|
result = {func_name}(input_data)
|
|
224
224
|
print(result)
|
|
@@ -253,7 +253,7 @@ Describe how to use this skill.
|
|
|
253
253
|
"""
|
|
254
254
|
|
|
255
255
|
def _generate_template_script(self, name: str, description: str) -> str:
|
|
256
|
-
"""Generate description-relevant scripts/
|
|
256
|
+
"""Generate description-relevant scripts/skill.py content."""
|
|
257
257
|
func_name = name.replace('-', '_')
|
|
258
258
|
|
|
259
259
|
# Analyze description to generate relevant code
|
|
@@ -297,6 +297,19 @@ Describe how to use this skill.
|
|
|
297
297
|
|
|
298
298
|
This script provides functionality for the {name} skill.
|
|
299
299
|
"""
|
|
300
|
+
import sys
|
|
301
|
+
import json
|
|
302
|
+
import pandas as pd
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
def json_serializer(obj):
|
|
306
|
+
"""Handle numpy types for JSON serialization."""
|
|
307
|
+
if hasattr(obj, 'item'):
|
|
308
|
+
return obj.item()
|
|
309
|
+
elif hasattr(obj, 'tolist'):
|
|
310
|
+
return obj.tolist()
|
|
311
|
+
return str(obj)
|
|
312
|
+
|
|
300
313
|
|
|
301
314
|
def {func_name}(file_path: str) -> dict:
|
|
302
315
|
"""
|
|
@@ -308,16 +321,14 @@ def {func_name}(file_path: str) -> dict:
|
|
|
308
321
|
Returns:
|
|
309
322
|
Dictionary with analysis results
|
|
310
323
|
"""
|
|
311
|
-
import pandas as pd
|
|
312
|
-
|
|
313
324
|
df = pd.read_csv(file_path)
|
|
314
325
|
|
|
315
326
|
result = {{
|
|
316
|
-
"rows": len(df),
|
|
317
|
-
"columns": len(df.columns),
|
|
327
|
+
"rows": int(len(df)),
|
|
328
|
+
"columns": int(len(df.columns)),
|
|
318
329
|
"column_names": list(df.columns),
|
|
319
330
|
"dtypes": {{col: str(dtype) for col, dtype in df.dtypes.items()}},
|
|
320
|
-
"missing_values": df.isnull().sum().to_dict(),
|
|
331
|
+
"missing_values": {{k: int(v) for k, v in df.isnull().sum().to_dict().items()}},
|
|
321
332
|
"numeric_summary": {{}}
|
|
322
333
|
}}
|
|
323
334
|
|
|
@@ -325,7 +336,7 @@ def {func_name}(file_path: str) -> dict:
|
|
|
325
336
|
for col in numeric_cols:
|
|
326
337
|
result["numeric_summary"][col] = {{
|
|
327
338
|
"mean": float(df[col].mean()),
|
|
328
|
-
"std": float(df[col].std()),
|
|
339
|
+
"std": float(df[col].std()) if len(df) > 1 else 0.0,
|
|
329
340
|
"min": float(df[col].min()),
|
|
330
341
|
"max": float(df[col].max())
|
|
331
342
|
}}
|
|
@@ -335,14 +346,11 @@ def {func_name}(file_path: str) -> dict:
|
|
|
335
346
|
|
|
336
347
|
def main():
|
|
337
348
|
"""Main entry point for the skill."""
|
|
338
|
-
import sys
|
|
339
|
-
import json
|
|
340
|
-
|
|
341
349
|
if len(sys.argv) > 1:
|
|
342
350
|
result = {func_name}(sys.argv[1])
|
|
343
|
-
print(json.dumps(result, indent=2))
|
|
351
|
+
print(json.dumps(result, indent=2, default=json_serializer))
|
|
344
352
|
else:
|
|
345
|
-
print("Usage: python
|
|
353
|
+
print("Usage: python skill.py <csv_file>")
|
|
346
354
|
|
|
347
355
|
|
|
348
356
|
if __name__ == "__main__":
|
|
@@ -351,27 +359,27 @@ if __name__ == "__main__":
|
|
|
351
359
|
|
|
352
360
|
def _generate_pdf_script(self, name: str, description: str, func_name: str) -> str:
|
|
353
361
|
"""Generate PDF processing script."""
|
|
354
|
-
return f'''"""\n{name} - {description}\n\nThis script provides PDF processing functionality.\n"""\n\ndef {func_name}(file_path: str) -> dict:\n """\n Process PDF file and extract content.\n \n Args:\n file_path: Path to the PDF file\n \n Returns:\n Dictionary with extracted content\n """\n from pypdf import PdfReader\n \n reader = PdfReader(file_path)\n \n result = {{\n "pages": len(reader.pages),\n "metadata": {{\n "title": reader.metadata.title if reader.metadata else None,\n "author": reader.metadata.author if reader.metadata else None\n }},\n "text": []\n }}\n \n for i, page in enumerate(reader.pages):\n result["text"].append({{\n "page": i + 1,\n "content": page.extract_text()\n }})\n \n return result\n\n\ndef main():\n """Main entry point for the skill."""\n import sys\n import json\n \n if len(sys.argv) > 1:\n result = {func_name}(sys.argv[1])\n print(json.dumps(result, indent=2))\n else:\n print("Usage: python
|
|
362
|
+
return f'''"""\n{name} - {description}\n\nThis script provides PDF processing functionality.\n"""\n\ndef {func_name}(file_path: str) -> dict:\n """\n Process PDF file and extract content.\n \n Args:\n file_path: Path to the PDF file\n \n Returns:\n Dictionary with extracted content\n """\n from pypdf import PdfReader\n \n reader = PdfReader(file_path)\n \n result = {{\n "pages": len(reader.pages),\n "metadata": {{\n "title": reader.metadata.title if reader.metadata else None,\n "author": reader.metadata.author if reader.metadata else None\n }},\n "text": []\n }}\n \n for i, page in enumerate(reader.pages):\n result["text"].append({{\n "page": i + 1,\n "content": page.extract_text()\n }})\n \n return result\n\n\ndef main():\n """Main entry point for the skill."""\n import sys\n import json\n \n if len(sys.argv) > 1:\n result = {func_name}(sys.argv[1])\n print(json.dumps(result, indent=2))\n else:\n print("Usage: python skill.py <pdf_file>")\n\n\nif __name__ == "__main__":\n main()\n'''
|
|
355
363
|
|
|
356
364
|
def _generate_api_script(self, name: str, description: str, func_name: str) -> str:
|
|
357
365
|
"""Generate API/HTTP request script."""
|
|
358
|
-
return f'''"""\n{name} - {description}\n\nThis script provides API request functionality.\n"""\nimport requests\n\ndef {func_name}(url: str, method: str = "GET", data: dict = None) -> dict:\n """\n Make HTTP request to API endpoint.\n \n Args:\n url: API endpoint URL\n method: HTTP method (GET, POST, PUT, DELETE)\n data: Optional request body data\n \n Returns:\n Dictionary with response data\n """\n headers = {{"Content-Type": "application/json"}}\n \n if method.upper() == "GET":\n response = requests.get(url, headers=headers)\n elif method.upper() == "POST":\n response = requests.post(url, json=data, headers=headers)\n elif method.upper() == "PUT":\n response = requests.put(url, json=data, headers=headers)\n elif method.upper() == "DELETE":\n response = requests.delete(url, headers=headers)\n else:\n raise ValueError(f"Unsupported method: {{method}}")\n \n return {{\n "status_code": response.status_code,\n "headers": dict(response.headers),\n "data": response.json() if response.headers.get("content-type", "").startswith("application/json") else response.text\n }}\n\n\ndef main():\n """Main entry point for the skill."""\n import sys\n import json\n \n if len(sys.argv) > 1:\n result = {func_name}(sys.argv[1])\n print(json.dumps(result, indent=2))\n else:\n print("Usage: python
|
|
366
|
+
return f'''"""\n{name} - {description}\n\nThis script provides API request functionality.\n"""\nimport requests\n\ndef {func_name}(url: str, method: str = "GET", data: dict = None) -> dict:\n """\n Make HTTP request to API endpoint.\n \n Args:\n url: API endpoint URL\n method: HTTP method (GET, POST, PUT, DELETE)\n data: Optional request body data\n \n Returns:\n Dictionary with response data\n """\n headers = {{"Content-Type": "application/json"}}\n \n if method.upper() == "GET":\n response = requests.get(url, headers=headers)\n elif method.upper() == "POST":\n response = requests.post(url, json=data, headers=headers)\n elif method.upper() == "PUT":\n response = requests.put(url, json=data, headers=headers)\n elif method.upper() == "DELETE":\n response = requests.delete(url, headers=headers)\n else:\n raise ValueError(f"Unsupported method: {{method}}")\n \n return {{\n "status_code": response.status_code,\n "headers": dict(response.headers),\n "data": response.json() if response.headers.get("content-type", "").startswith("application/json") else response.text\n }}\n\n\ndef main():\n """Main entry point for the skill."""\n import sys\n import json\n \n if len(sys.argv) > 1:\n result = {func_name}(sys.argv[1])\n print(json.dumps(result, indent=2))\n else:\n print("Usage: python skill.py <url>")\n\n\nif __name__ == "__main__":\n main()\n'''
|
|
359
367
|
|
|
360
368
|
def _generate_file_script(self, name: str, description: str, func_name: str) -> str:
|
|
361
369
|
"""Generate file processing script."""
|
|
362
|
-
return f'''"""\n{name} - {description}\n\nThis script provides file processing functionality.\n"""\nfrom pathlib import Path\n\ndef {func_name}(file_path: str) -> dict:\n """\n Process file and return information.\n \n Args:\n file_path: Path to the file to process\n \n Returns:\n Dictionary with file information and content\n """\n path = Path(file_path)\n \n if not path.exists():\n raise FileNotFoundError(f"File not found: {{file_path}}")\n \n stat = path.stat()\n \n result = {{\n "name": path.name,\n "extension": path.suffix,\n "size_bytes": stat.st_size,\n "is_file": path.is_file(),\n "is_dir": path.is_dir()\n }}\n \n if path.is_file() and stat.st_size < 1024 * 1024:\n try:\n result["content"] = path.read_text()\n result["lines"] = len(result["content"].splitlines())\n except UnicodeDecodeError:\n result["content"] = "<binary file>"\n \n return result\n\n\ndef main():\n """Main entry point for the skill."""\n import sys\n import json\n \n if len(sys.argv) > 1:\n result = {func_name}(sys.argv[1])\n print(json.dumps(result, indent=2))\n else:\n print("Usage: python
|
|
370
|
+
return f'''"""\n{name} - {description}\n\nThis script provides file processing functionality.\n"""\nfrom pathlib import Path\n\ndef {func_name}(file_path: str) -> dict:\n """\n Process file and return information.\n \n Args:\n file_path: Path to the file to process\n \n Returns:\n Dictionary with file information and content\n """\n path = Path(file_path)\n \n if not path.exists():\n raise FileNotFoundError(f"File not found: {{file_path}}")\n \n stat = path.stat()\n \n result = {{\n "name": path.name,\n "extension": path.suffix,\n "size_bytes": stat.st_size,\n "is_file": path.is_file(),\n "is_dir": path.is_dir()\n }}\n \n if path.is_file() and stat.st_size < 1024 * 1024:\n try:\n result["content"] = path.read_text()\n result["lines"] = len(result["content"].splitlines())\n except UnicodeDecodeError:\n result["content"] = "<binary file>"\n \n return result\n\n\ndef main():\n """Main entry point for the skill."""\n import sys\n import json\n \n if len(sys.argv) > 1:\n result = {func_name}(sys.argv[1])\n print(json.dumps(result, indent=2))\n else:\n print("Usage: python skill.py <file_path>")\n\n\nif __name__ == "__main__":\n main()\n'''
|
|
363
371
|
|
|
364
372
|
def _generate_image_script(self, name: str, description: str, func_name: str) -> str:
|
|
365
373
|
"""Generate image processing script."""
|
|
366
|
-
return f'''"""\n{name} - {description}\n\nThis script provides image processing functionality.\n"""\nfrom PIL import Image\n\ndef {func_name}(file_path: str, output_path: str = None, resize: tuple = None) -> dict:\n """\n Process image file.\n \n Args:\n file_path: Path to the image file\n output_path: Optional output path for processed image\n resize: Optional tuple (width, height) to resize\n \n Returns:\n Dictionary with image information\n """\n img = Image.open(file_path)\n \n result = {{\n "format": img.format,\n "mode": img.mode,\n "size": img.size,\n "width": img.width,\n "height": img.height\n }}\n \n if resize:\n img = img.resize(resize)\n result["resized_to"] = resize\n \n if output_path:\n img.save(output_path)\n result["saved_to"] = output_path\n \n return result\n\n\ndef main():\n """Main entry point for the skill."""\n import sys\n import json\n \n if len(sys.argv) > 1:\n result = {func_name}(sys.argv[1])\n print(json.dumps(result, indent=2))\n else:\n print("Usage: python
|
|
374
|
+
return f'''"""\n{name} - {description}\n\nThis script provides image processing functionality.\n"""\nfrom PIL import Image\n\ndef {func_name}(file_path: str, output_path: str = None, resize: tuple = None) -> dict:\n """\n Process image file.\n \n Args:\n file_path: Path to the image file\n output_path: Optional output path for processed image\n resize: Optional tuple (width, height) to resize\n \n Returns:\n Dictionary with image information\n """\n img = Image.open(file_path)\n \n result = {{\n "format": img.format,\n "mode": img.mode,\n "size": img.size,\n "width": img.width,\n "height": img.height\n }}\n \n if resize:\n img = img.resize(resize)\n result["resized_to"] = resize\n \n if output_path:\n img.save(output_path)\n result["saved_to"] = output_path\n \n return result\n\n\ndef main():\n """Main entry point for the skill."""\n import sys\n import json\n \n if len(sys.argv) > 1:\n result = {func_name}(sys.argv[1])\n print(json.dumps(result, indent=2))\n else:\n print("Usage: python skill.py <image_file>")\n\n\nif __name__ == "__main__":\n main()\n'''
|
|
367
375
|
|
|
368
376
|
def _generate_json_script(self, name: str, description: str, func_name: str) -> str:
|
|
369
377
|
"""Generate JSON/YAML processing script."""
|
|
370
|
-
return f'''"""\n{name} - {description}\n\nThis script provides JSON/YAML processing functionality.\n"""\nimport json\nfrom pathlib import Path\n\ndef {func_name}(file_path: str) -> dict:\n """\n Process JSON or YAML file.\n \n Args:\n file_path: Path to the JSON/YAML file\n \n Returns:\n Dictionary with parsed content and metadata\n """\n path = Path(file_path)\n content = path.read_text()\n \n if path.suffix in [".yaml", ".yml"]:\n import yaml\n data = yaml.safe_load(content)\n else:\n data = json.loads(content)\n \n result = {{\n "file": file_path,\n "format": "yaml" if path.suffix in [".yaml", ".yml"] else "json",\n "keys": list(data.keys()) if isinstance(data, dict) else None,\n "length": len(data) if isinstance(data, (list, dict)) else None,\n "data": data\n }}\n \n return result\n\n\ndef main():\n """Main entry point for the skill."""\n import sys\n \n if len(sys.argv) > 1:\n result = {func_name}(sys.argv[1])\n print(json.dumps(result, indent=2))\n else:\n print("Usage: python
|
|
378
|
+
return f'''"""\n{name} - {description}\n\nThis script provides JSON/YAML processing functionality.\n"""\nimport json\nfrom pathlib import Path\n\ndef {func_name}(file_path: str) -> dict:\n """\n Process JSON or YAML file.\n \n Args:\n file_path: Path to the JSON/YAML file\n \n Returns:\n Dictionary with parsed content and metadata\n """\n path = Path(file_path)\n content = path.read_text()\n \n if path.suffix in [".yaml", ".yml"]:\n import yaml\n data = yaml.safe_load(content)\n else:\n data = json.loads(content)\n \n result = {{\n "file": file_path,\n "format": "yaml" if path.suffix in [".yaml", ".yml"] else "json",\n "keys": list(data.keys()) if isinstance(data, dict) else None,\n "length": len(data) if isinstance(data, (list, dict)) else None,\n "data": data\n }}\n \n return result\n\n\ndef main():\n """Main entry point for the skill."""\n import sys\n \n if len(sys.argv) > 1:\n result = {func_name}(sys.argv[1])\n print(json.dumps(result, indent=2))\n else:\n print("Usage: python skill.py <json_or_yaml_file>")\n\n\nif __name__ == "__main__":\n main()\n'''
|
|
371
379
|
|
|
372
380
|
def _generate_text_script(self, name: str, description: str, func_name: str) -> str:
|
|
373
381
|
"""Generate text processing script."""
|
|
374
|
-
return f'''"""\n{name} - {description}\n\nThis script provides text processing functionality.\n"""\nimport re\n\ndef {func_name}(text: str, pattern: str = None, replacement: str = None) -> dict:\n """\n Process text with optional regex operations.\n \n Args:\n text: Input text to process\n pattern: Optional regex pattern to search\n replacement: Optional replacement string\n \n Returns:\n Dictionary with processing results\n """\n result = {{\n "original_length": len(text),\n "lines": len(text.splitlines()),\n "words": len(text.split()),\n "characters": len(text.replace(" ", ""))\n }}\n \n if pattern:\n matches = re.findall(pattern, text)\n result["matches"] = matches\n result["match_count"] = len(matches)\n \n if replacement is not None:\n result["replaced_text"] = re.sub(pattern, replacement, text)\n \n return result\n\n\ndef main():\n """Main entry point for the skill."""\n import sys\n import json\n \n if len(sys.argv) > 1:\n with open(sys.argv[1]) as f:\n text = f.read()\n result = {func_name}(text)\n print(json.dumps(result, indent=2))\n else:\n print("Usage: python
|
|
382
|
+
return f'''"""\n{name} - {description}\n\nThis script provides text processing functionality.\n"""\nimport re\n\ndef {func_name}(text: str, pattern: str = None, replacement: str = None) -> dict:\n """\n Process text with optional regex operations.\n \n Args:\n text: Input text to process\n pattern: Optional regex pattern to search\n replacement: Optional replacement string\n \n Returns:\n Dictionary with processing results\n """\n result = {{\n "original_length": len(text),\n "lines": len(text.splitlines()),\n "words": len(text.split()),\n "characters": len(text.replace(" ", ""))\n }}\n \n if pattern:\n matches = re.findall(pattern, text)\n result["matches"] = matches\n result["match_count"] = len(matches)\n \n if replacement is not None:\n result["replaced_text"] = re.sub(pattern, replacement, text)\n \n return result\n\n\ndef main():\n """Main entry point for the skill."""\n import sys\n import json\n \n if len(sys.argv) > 1:\n with open(sys.argv[1]) as f:\n text = f.read()\n result = {func_name}(text)\n print(json.dumps(result, indent=2))\n else:\n print("Usage: python skill.py <text_file>")\n\n\nif __name__ == "__main__":\n main()\n'''
|
|
375
383
|
|
|
376
384
|
def _generate_generic_script(self, name: str, description: str, func_name: str) -> str:
|
|
377
385
|
"""Generate generic script template."""
|
|
@@ -402,7 +410,7 @@ def main():
|
|
|
402
410
|
result = {func_name}(sys.argv[1])
|
|
403
411
|
print(result)
|
|
404
412
|
else:
|
|
405
|
-
print("Usage: python
|
|
413
|
+
print("Usage: python skill.py <input>")
|
|
406
414
|
|
|
407
415
|
|
|
408
416
|
if __name__ == "__main__":
|
|
@@ -477,17 +485,26 @@ metadata:
|
|
|
477
485
|
Generate detailed, practical content based on the description. Make it comprehensive but concise.
|
|
478
486
|
The skill should be immediately useful for an AI agent.
|
|
479
487
|
|
|
480
|
-
Also, if this skill requires any Python code to function, provide a
|
|
488
|
+
Also, if this skill requires any Python code to function, provide a skill.py that implements the core functionality.
|
|
481
489
|
The script MUST follow this pattern:
|
|
482
490
|
1. Have a main function that accepts file path as command line argument (sys.argv[1])
|
|
483
|
-
2. Print JSON output using json.dumps()
|
|
491
|
+
2. Print JSON output using json.dumps() with a custom default handler for numpy types
|
|
484
492
|
3. Include usage message if no arguments provided
|
|
493
|
+
4. Convert numpy types to native Python types (int, float) before JSON serialization
|
|
485
494
|
|
|
486
495
|
Example script pattern:
|
|
487
496
|
```python
|
|
488
497
|
import sys
|
|
489
498
|
import json
|
|
490
499
|
|
|
500
|
+
def json_serializer(obj):
|
|
501
|
+
\"\"\"Handle numpy types for JSON serialization.\"\"\"
|
|
502
|
+
if hasattr(obj, 'item'):
|
|
503
|
+
return obj.item()
|
|
504
|
+
elif hasattr(obj, 'tolist'):
|
|
505
|
+
return obj.tolist()
|
|
506
|
+
return str(obj)
|
|
507
|
+
|
|
491
508
|
def process_file(file_path: str) -> dict:
|
|
492
509
|
# Core logic here
|
|
493
510
|
return {{"result": "data"}}
|
|
@@ -495,9 +512,9 @@ def process_file(file_path: str) -> dict:
|
|
|
495
512
|
def main():
|
|
496
513
|
if len(sys.argv) > 1:
|
|
497
514
|
result = process_file(sys.argv[1])
|
|
498
|
-
print(json.dumps(result, indent=2))
|
|
515
|
+
print(json.dumps(result, indent=2, default=json_serializer))
|
|
499
516
|
else:
|
|
500
|
-
print("Usage: python
|
|
517
|
+
print("Usage: python skill.py <file_path>")
|
|
501
518
|
|
|
502
519
|
if __name__ == "__main__":
|
|
503
520
|
main()
|
|
@@ -57,7 +57,7 @@ class CloudDeployer:
|
|
|
57
57
|
file.write("FROM python:3.11-slim\n")
|
|
58
58
|
file.write("WORKDIR /app\n")
|
|
59
59
|
file.write("COPY . .\n")
|
|
60
|
-
file.write("RUN pip install flask praisonai==2.3.
|
|
60
|
+
file.write("RUN pip install flask praisonai==2.3.87 gunicorn markdown\n")
|
|
61
61
|
file.write("EXPOSE 8080\n")
|
|
62
62
|
file.write('CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]\n')
|
|
63
63
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.3.87"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.3.85"
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|