feat: ContentGuardianAgent, onboarding UX, Team Activity action wiring, docs, agent help modal
ContentGuardianAgent consolidation:
- Merge 3 duplicate classes into single source in specialized/content_guardian.py
- Watchdog audit_committee() with heuristic scoring, coverage gaps, overlaps, alerts
- Remove misleading rejection_rate() helper; use acceptance_rate directly
- Integrate audit + alerts + trend signals into today_workflow_service.py
Team Activity page:
- QualityAuditPanel: health ring, per-agent critiques, coverage gaps, overlaps
- TrendSignalsPanel: opportunity cards with urgency/impact/coverage bars
- AlertBanner: persistent dismiss via POST /alerts/{id}/mark-read
- AgentHelpModal: dialog showing all 8 agents with descriptions, tools, schedule
- QualityAuditPanel action buttons: Fill gap -> /content-planning, Resolve overlap, View CTA on alerts/issues
- TrendSignalsPanel action buttons: Create content from this trend -> /blog-writer with trend context state
Onboarding system:
- Step 4 validation: no auto-pass via basic_ready; requires persona data or explicit progression
- Step 5 validation: logs warning on auto-pass without integration data
- OnboardingCompletionService: single DB session, transactional task creation, upsert pattern
- Business-without-website: nullable website_url on SIFIndexingTask and MarketTrendsTask
- DeepCompetitorAnalysisExecutor: 5-min timeout, 10-competitor cap, asyncio.wait_for
- Persona generation: async with 30s timeout, falls back to scheduler
- OnboardingProgressService.reset_onboarding(): resets session + pauses all DB tasks
- OnboardingControlService.reset_onboarding(): also cancels APScheduler jobs
- FinalStep TaskSchedulingPanel: shows scheduled/failed tasks after completion, 8s auto-redirect
- onboarding_completed agent activity event logged to feed
Documentation:
- docs-site/features/onboarding/: overview, steps, scheduler-tasks, technical-reference (4 pages)
- docs-site/mkdocs.yml: added Onboarding System nav section
- docs-site/features/sif-agents/: overview, agent-directory, committee-system, content-guardian (4 pages)
- docs-site/features/team-activity/: overview, quality-audit, trend-signals, alert-system (4 pages)
- docs-site/features/todays-workflow/: updated overview, technical-architecture, workflow-guide, api-reference
This commit is contained in:
@@ -225,9 +225,9 @@ class WixService:
|
||||
'error': str(e)
|
||||
}
|
||||
|
||||
def import_image_to_wix(self, access_token: str, image_url: str, display_name: str = None) -> str:
|
||||
def import_image_to_wix(self, access_token: str, image_url: str, display_name: str = None) -> Optional[str]:
|
||||
"""
|
||||
Import external image to Wix Media Manager
|
||||
Import external image to Wix Media Manager.
|
||||
|
||||
Args:
|
||||
access_token: Valid access token
|
||||
@@ -235,7 +235,7 @@ class WixService:
|
||||
display_name: Optional display name for the image
|
||||
|
||||
Returns:
|
||||
Wix media ID
|
||||
Wix media ID string, or None if import failed
|
||||
"""
|
||||
try:
|
||||
result = self.media_service.import_image(
|
||||
@@ -243,10 +243,15 @@ class WixService:
|
||||
image_url,
|
||||
display_name or f'Imported Image {datetime.now().strftime("%Y%m%d_%H%M%S")}'
|
||||
)
|
||||
return result['file']['id']
|
||||
except requests.RequestException as e:
|
||||
logger.error(f"Failed to import image to Wix: {e}")
|
||||
raise
|
||||
if result and isinstance(result, dict) and 'file' in result:
|
||||
media_id = result['file'].get('id')
|
||||
if media_id:
|
||||
return str(media_id)
|
||||
logger.warning(f"Image import returned unexpected result structure: {type(result)}")
|
||||
return None
|
||||
except Exception as e:
|
||||
logger.warning(f"Failed to import image to Wix (non-fatal): {e}")
|
||||
return None
|
||||
|
||||
def convert_content_to_ricos(self, content: str, images: List[str] = None,
|
||||
use_wix_api: bool = False, access_token: str = None) -> Dict[str, Any]:
|
||||
@@ -276,7 +281,8 @@ class WixService:
|
||||
def create_blog_post(self, access_token: str, title: str, content: str,
|
||||
cover_image_url: str = None, category_ids: List[str] = None,
|
||||
tag_ids: List[str] = None, publish: bool = True,
|
||||
member_id: str = None, seo_metadata: Dict[str, Any] = None) -> Dict[str, Any]:
|
||||
member_id: str = None, seo_metadata: Dict[str, Any] = None,
|
||||
site_id: str = None) -> Dict[str, Any]:
|
||||
"""
|
||||
Create and optionally publish a blog post on Wix
|
||||
|
||||
@@ -322,6 +328,7 @@ class WixService:
|
||||
tag_ids=tag_ids,
|
||||
publish=publish,
|
||||
seo_metadata=seo_metadata,
|
||||
site_id=site_id,
|
||||
import_image_func=self.import_image_to_wix,
|
||||
lookup_categories_func=self.lookup_or_create_categories,
|
||||
lookup_tags_func=self.lookup_or_create_tags,
|
||||
|
||||
Reference in New Issue
Block a user