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
@@ -187,12 +187,12 @@ async def check_loop_type_requirements_status(slug: str, loop_type: str):
187
187
  detail=f"No requirements found for loop type: {loop_type}",
188
188
  )
189
189
 
190
- # Check credentials for auth requirement
190
+ # Check for authenticated account
191
191
  from ralphx.core.database import Database
192
192
 
193
193
  global_db = Database()
194
- credentials = global_db.get_credentials()
195
- has_auth = credentials is not None
194
+ accounts = global_db.list_accounts(include_inactive=False, include_deleted=False)
195
+ has_auth = len(accounts) > 0
196
196
 
197
197
  # Get resource counts by type
198
198
  resources = project_db.list_resources(enabled=True)
@@ -425,59 +425,6 @@ async def import_jsonl_with_format(
425
425
  tmp_path.unlink(missing_ok=True)
426
426
 
427
427
 
428
- # ============================================================================
429
- # Namespace Endpoints
430
- # ============================================================================
431
-
432
-
433
- class NamespaceInfo(BaseModel):
434
- """Information about a namespace."""
435
-
436
- namespace: str
437
- item_count: int
438
- pending_count: int
439
- completed_count: int
440
- processed_count: int
441
-
442
-
443
- @router.get("/{slug}/namespaces", response_model=list[NamespaceInfo])
444
- async def list_namespaces(slug: str):
445
- """List all namespaces with item counts.
446
-
447
- Returns namespaces that have work items, along with counts by status.
448
- """
449
- manager, project, project_db = get_project(slug)
450
-
451
- # Get all items grouped by namespace
452
- items, _ = project_db.list_work_items(limit=10000)
453
-
454
- namespace_stats = {}
455
- for item in items:
456
- ns = item.get("namespace")
457
- if not ns:
458
- continue
459
-
460
- if ns not in namespace_stats:
461
- namespace_stats[ns] = {
462
- "namespace": ns,
463
- "item_count": 0,
464
- "pending_count": 0,
465
- "completed_count": 0,
466
- "processed_count": 0,
467
- }
468
-
469
- namespace_stats[ns]["item_count"] += 1
470
- status = item.get("status", "pending")
471
- if status == "pending":
472
- namespace_stats[ns]["pending_count"] += 1
473
- elif status == "completed":
474
- namespace_stats[ns]["completed_count"] += 1
475
- elif status == "processed":
476
- namespace_stats[ns]["processed_count"] += 1
477
-
478
- return [NamespaceInfo(**ns) for ns in namespace_stats.values()]
479
-
480
-
481
428
  # ============================================================================
482
429
  # Project Resources (Shared Library) Endpoints
483
430
  # ============================================================================