ralphx 0.2.2__py3-none-any.whl → 0.3.5__py3-none-any.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.
Files changed (45) hide show
  1. ralphx/__init__.py +1 -1
  2. ralphx/api/main.py +9 -1
  3. ralphx/api/routes/auth.py +730 -65
  4. ralphx/api/routes/config.py +3 -56
  5. ralphx/api/routes/export_import.py +795 -0
  6. ralphx/api/routes/loops.py +4 -4
  7. ralphx/api/routes/planning.py +19 -5
  8. ralphx/api/routes/projects.py +84 -2
  9. ralphx/api/routes/templates.py +115 -2
  10. ralphx/api/routes/workflows.py +22 -22
  11. ralphx/cli.py +21 -6
  12. ralphx/core/auth.py +346 -171
  13. ralphx/core/database.py +615 -167
  14. ralphx/core/executor.py +0 -3
  15. ralphx/core/loop.py +15 -2
  16. ralphx/core/loop_templates.py +69 -3
  17. ralphx/core/planning_service.py +109 -21
  18. ralphx/core/preview.py +9 -25
  19. ralphx/core/project_db.py +175 -75
  20. ralphx/core/project_export.py +469 -0
  21. ralphx/core/project_import.py +670 -0
  22. ralphx/core/sample_project.py +430 -0
  23. ralphx/core/templates.py +46 -9
  24. ralphx/core/workflow_executor.py +35 -5
  25. ralphx/core/workflow_export.py +606 -0
  26. ralphx/core/workflow_import.py +1149 -0
  27. ralphx/examples/sample_project/DESIGN.md +345 -0
  28. ralphx/examples/sample_project/README.md +37 -0
  29. ralphx/examples/sample_project/guardrails.md +57 -0
  30. ralphx/examples/sample_project/stories.jsonl +10 -0
  31. ralphx/mcp/__init__.py +6 -2
  32. ralphx/mcp/registry.py +3 -3
  33. ralphx/mcp/server.py +99 -29
  34. ralphx/mcp/tools/__init__.py +4 -0
  35. ralphx/mcp/tools/help.py +204 -0
  36. ralphx/mcp/tools/workflows.py +114 -32
  37. ralphx/mcp_server.py +6 -2
  38. ralphx/static/assets/index-0ovNnfOq.css +1 -0
  39. ralphx/static/assets/index-CY9s08ZB.js +251 -0
  40. ralphx/static/assets/index-CY9s08ZB.js.map +1 -0
  41. ralphx/static/index.html +14 -0
  42. {ralphx-0.2.2.dist-info → ralphx-0.3.5.dist-info}/METADATA +34 -12
  43. {ralphx-0.2.2.dist-info → ralphx-0.3.5.dist-info}/RECORD +45 -30
  44. {ralphx-0.2.2.dist-info → ralphx-0.3.5.dist-info}/WHEEL +0 -0
  45. {ralphx-0.2.2.dist-info → ralphx-0.3.5.dist-info}/entry_points.txt +0 -0
ralphx/__init__.py CHANGED
@@ -1,6 +1,6 @@
1
1
  """RalphX - Generic agent loop orchestration system."""
2
2
 
3
- __version__ = "0.1.0"
3
+ __version__ = "0.3.5"
4
4
  __author__ = "Jack"
5
5
 
6
6
  # Package metadata
ralphx/api/main.py CHANGED
@@ -27,7 +27,7 @@ from fastapi.responses import FileResponse, JSONResponse
27
27
  from fastapi.staticfiles import StaticFiles
28
28
 
29
29
  from ralphx import __version__
30
- from ralphx.api.routes import auth, config, files, filesystem, imports, items, logs, loops, planning, projects, resources, runs, stream, templates, workflows
30
+ from ralphx.api.routes import auth, config, export_import, files, filesystem, imports, items, logs, loops, planning, projects, resources, runs, stream, templates, workflows
31
31
  from ralphx.core.auth import restore_orphaned_backup
32
32
  from ralphx.core.workspace import ensure_workspace
33
33
 
@@ -123,10 +123,17 @@ async def _stale_run_cleanup_loop():
123
123
  async def lifespan(app: FastAPI):
124
124
  """Application lifespan events."""
125
125
  from ralphx.core.logger import system_log
126
+ from ralphx.core.sample_project import ensure_sample_project_created
126
127
 
127
128
  # Startup
128
129
  ensure_workspace()
129
130
 
131
+ # Create sample project on first run
132
+ try:
133
+ ensure_sample_project_created()
134
+ except Exception as e:
135
+ logger.warning(f"Sample project creation failed: {e}")
136
+
130
137
  # Restore any orphaned credential backups from previous crashes
131
138
  # This ensures user's main credentials are ALWAYS restored
132
139
  restore_orphaned_backup()
@@ -278,6 +285,7 @@ app.include_router(logs.router, prefix="/api", tags=["logs"])
278
285
  app.include_router(config.router, prefix="/api/projects", tags=["config"])
279
286
  app.include_router(workflows.router, prefix="/api/projects/{slug}", tags=["workflows"])
280
287
  app.include_router(planning.router, prefix="/api/projects/{slug}", tags=["planning"])
288
+ app.include_router(export_import.router, prefix="/api/projects/{slug}", tags=["export-import"])
281
289
 
282
290
 
283
291
  # Root endpoint