Spaces:
Running
Running
Commit History
-
Mission M-E β Observability & Testsβ
Ashraf Al-Kassem +1: Claude Sonnet 4.6- ADK callback handler (callbacks.py): logs all lifecycle events to RuntimeEventLog - agent.{name}.started/completed, agent.llm_request/response, agent.error - tool.{name}.started/completed, tool error events - _redact_sensitive() strips access_token, api_key, password, token fields - runner.py: attaches LeadPilotCallbackHandler to agent after build_orchestrator() - tracks turn duration + records agent.turns_processed / avg_turn_duration_ms metrics - metrics_service.py: adds gauge() method (overwrites, not additive) - admin.py: GET /executions/{instance_id}/trace β returns chronological event timeline - 8 new tests: test_callbacks.py (5 unit), test_e2e_agent_flow.py (3 E2E) - Frontend: execution trace timeline page at /admin/executions/[executionId] - Frontend: monitoring/page.tsx β Agent Metrics tab + View Trace links in Executions tab - docs/missions/event-types.md: full event taxonomy reference Total tests: 360 (all passing) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthrβ¦87e5ad2 -
Mission M-D β Flow Builder Revampβ
Ashraf Al-Kassem +1: Claude Sonnet 4.6- Unlocks CONDITION and WAIT_DELAY nodes (no longer blocked from publish) - Adds PARALLEL, AGENT_HANDOFF, QUALIFICATION_GATE, INTENT_ROUTER node types - builder_translator.translate() now returns dual output: (definition_json, adk_pipeline_config) - New translate_to_adk_pipeline() function maps builder graph β ADK orchestrator config - FlowVersion.adk_pipeline_config column (JSON) populated on publish - ExecutionInstance.resume_at + resume_node_id columns for WAIT_DELAY resumption - Alembic migration s9t0u1v2w3x4 - build_orchestrator() accepts pipeline_config; applies builder tone/routing overrides - build_reply_agent() accepts tone + max_length params - Celery: resume_waiting_instances_task (every 60s) resumes WAITING instances - Frontend: ActionNode multi-handle (CONDITION: true/false, QUALIFICATION_GATE: qualified/unqualified) - Frontend: NodePalette groups (Triggers, Agent Nodes, Flow Control, Routing) - Frontend: full config forms for all new node types - 352 tests passing (8 new)β¦68e389f
-
Mission 38 β Social Login (Facebook + TikTok)β
Ashraf Al-Kassem +1: Claude Sonnet 4.6- Add UserIdentity model for multi-provider social identity storage - Add purpose field to OAuthState to separate auth vs integration flows - Add fetch_user_profile() to Facebook and TikTok OAuth adapters - New /api/v1/auth/oauth/{provider}/start + callback endpoints - Resolution logic: existing identity β email match β new user - Placeholder email for TikTok (no email scope available) - 8 new tests, all passing; fix 2 WhatsApp hardening tests (Redis mock) - Frontend: Facebook + TikTok buttons on login/signup + /auth/social/callback page Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>c324adc -
Mission 37 β Universal OAuth Provider Frameworkβ
Ashraf Al-Kassem +1: Claude Sonnet 4.6Builds a provider-agnostic OAuth foundation for Facebook, TikTok, HubSpot, and Salesforce. Establishes the reusable patterns that all future OAuth-based integrations will extend. - DB: oauthprovider (registry), oauthconnection (encrypted tokens), oauthstate (CSRF-safe state, 10-min TTL) β migration n4o5p6q7r8s9 - Provider adapters: base ABC + Facebook, TikTok, HubSpot, Salesforce - oauth_service: state creation, authorize URL, code exchange, save connection, refresh token, revoke β all tokens Fernet-encrypted - Routes: GET /oauth/{provider}/authorize, /callback, /connections, DELETE /connections/{id}, POST /connections/{id}/refresh - Admin routes: list providers+stats, list connections, toggle provider - Idempotent seed: 4 providers seeded at startup - Frontend: generic /integrations/callback page, oauth.ts utility, admin portal OAuth Providers and Connections pages - 8 tests, all pass (317/319 total suite) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>ad82999
-
Lock out dark mode to prioritize stability
Ashraf Al-Kassem3cbc63c -
Fix dark mode UI elements across dashboard
Ashraf Al-Kassemc0d36bc -
Add dark mode toggle to end-user dashboard
Ashraf Al-Kassem6c8c970 -
Refactor Template Details validation to use sonner toast
Ashraf Al-Kassem66154ca -
UI polish for Template Details and Canvas Editor
Ashraf Al-Kassem4bffb79 -
fix(admin): correct basePath-prefixed hrefs for logout and product login linkβ
Ashraf Al-Kassem +1: Claude Sonnet 4.6Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>dffa8ae -
fix(templates): redirect to detail page when list-page clone failsβ
Ashraf Al-Kassem +1: Claude Sonnet 4.6When a template has required variables and the user clicks "Use Template" from the list, the clone API returns an error which was silently swallowed β the button just reset to idle with zero feedback. On failure, now redirect to /templates/{slug} where the user can fill in required variables using the already-correct detail-page clone flow. Templates with no required variables (or all defaults set) still clone directly from the list and navigate to the new automation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>f425cfb
-
chore(marketing): Finalize animations and docker architecture
Ashraf Al-Kassem49d2391 -
feat: Mission 34 β Admin Plan Overrides + Expiry + Audit Trailβ
Ashraf Al-Kassem +1: Claude Sonnet 4.6- Add PlanOverride model (time-bound workspace plan grants) - Update entitlement resolver: override > base plan precedence with self-heal - Expose plan_source + override_expires_at in GET /entitlements - Add admin_plans.py: 3 endpoints (plan-status, plan-override, revoke) - Celery beat job expire_plan_overrides_task every 5 min - Admin workspace detail UI: Plan Override card with apply/revoke form - 3 admin-api.ts methods for override CRUD - Alembic migration m3n4o5p6q7r8 for planoverride table - 6 passing tests: apply, self-heal, worker expiry, revoke, dedup, audit Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>a21ab3d -
fix: production API base URL fallback β use relative paths on non-localhost browserβ
Ashraf Al-Kassem +1: Claude Sonnet 4.6NEXT_PUBLIC_API_BASE_URL is not baked into the Stage 1 build (set in Stage 2 after the frontend is already built), so process.env.NEXT_PUBLIC_API_BASE_URL is undefined in the client bundle on HuggingFace. The old fallback returned 'http://127.0.0.1:8000' for any non-localhost browser, which is the client's own loopback β inaccessible from HF β blocking all client-side API calls including Google OAuth. Fix: when running in the browser on a non-localhost host, return '' so fetch uses relative paths (/api/v1/...). nginx then proxies /api/* to the FastAPI backend. SSR (window === undefined) continues to use the direct Docker-internal address http://127.0.0.1:8000. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>3b7374c
-
feat(website): natively merge marketing website into frontend application; resolve HF deployment routing collisions
Ashraf Al-Kassem86e8e8d -
Redesign template card
Ashraf Al-Kassem0869d3f -
fix: Google OAuth redirect URI mismatch + template badge UIβ
Ashraf Al-Kassem +1: Claude Sonnet 4.6- Fix get_google_redirect_uri() to use APP_BASE_URL/FRONTEND_URL instead of the backend request URL, resolving error 400 on Google sign in (local dev: was sending localhost:8000 instead of localhost:3000) - Remove unused request param from get_google_redirect_uri and both google_auth_start / google_auth_callback route handlers - Template cards: solid-filled category badges (teal-600) and platform badges (slate-700) to match design; industry tags rendered as plain uppercase text instead of pill badges Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>0ef8648 -
feat: Mission 32 β Template Catalog Expansion + 12 Pre-Made Automation Templatesβ
Ashraf Al-Kassem +1: Claude Opus 4.6Template Variables System: {{key}} placeholders in builder graphs replaced during clone with user-supplied values. Supports text, phone, url, number, textarea types with required/optional + defaults. Version Locking: Cloned flows track source_template_id and version_id. GET /automations/{id} returns latest_template_version info for "update available" badge. POST rebase-to-template endpoint re-applies stored variable values to newer template version. Analytics: TemplateUsageStat tracks clone_count, publish_count, active_flows_count. clone_count shown in catalog, sort=popular support. 12 Production Templates seeded at startup (idempotent by slug): - 6 WhatsApp: lead qualifier, appointment booking, FAQ responder, pricing gatekeeper, reactivation campaign, sales concierge - 4 Meta: Instagram DM responder, Messenger support intake, Lead Ads intake, Instagram appointment booking - 2 Omnichannel: lead qualifier, inbound-to-CRM pipeline Frontend: variable form on template detail, platfβ¦740c3bd -
feat: Mission 29 β Prompt Studio Enhancements + Auth Fixes + User Seedingβ
Ashraf Al-Kassem +1: Claude Opus 4.6Mission 29: Knowledge chunking (DOCX/XLSX support, keyword retrieval), dynamic qualification criteria (relational CRUD), AI step output schema, and prompt compiler integration for all three. Auth fixes: seed demo + admin users on startup, fix Google OAuth email_verified_at bug, fix admin-api.ts 403 logout, comprehensive auth test suite (19 tests covering studio + admin flows). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>a5f93e1 -
feat: Mission 28 β Data Flow & Reference Tables End-to-End Wiringβ
Ashraf Al-Kassem +1: Claude Opus 4.6Backend: - New GET /entitlements endpoint (plan + modules + usage for active workspace) - New settings sub-endpoints: GET/PATCH /settings/profile, GET /settings/subscription, GET /settings/modules - Catalog additions: template-categories, template-platforms - required_module field on ZOHO_UPSERT_LEAD node type - WorkspaceEntitlementOverride.enabled nullable boolean for explicit module gating - Alembic migration for enabled column - Entitlements service updated: override.enabled=False blocks, True force-enables Frontend: - Settings page: Subscription tab (plan badge + usage bars) and Modules tab (enabled/source) - Templates page: catalog-driven filters replacing hardcoded labels + entitlement messaging - Node palette: locked badge for nodes requiring unavailable modules - Dashboard: Plan & Usage card with top-3 usage progress bars - Admin workspace detail: inline usage limit override editing with pencil icon Tests: 13 new tests (test_entitlements_api, test_settings_pages, test_referenβ¦fc6fc7e
-
fix: use named ReactFlow import for @xyflow/react v12 compatibilityβ
Ashraf Al-Kassem +1: Claude Opus 4.6ReactFlow is a named export (not default) in @xyflow/react v12, which caused the HuggingFace Docker build to fail during Next.js compilation. Also removed undefined OnDrop type annotation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>ae2871c -
feat: Mission 27 β Automation Builder v2 + Template Catalog Foundationβ
Ashraf Al-Kassem +1: Claude Sonnet 4.6- Visual canvas editor (ReactFlow @xyflow/react v12) with TriggerNode, ActionNode, NodePalette, NodeConfigPanel - FlowDraft model: per-flow mutable builder graph, separate from immutable FlowVersion - Builder v2 endpoints: GET/PUT draft, validate, publish, simulate, rollback, versions - builder_translator.py: validate_graph, translate, simulate β 21 unit tests passing - AutomationTemplate + AutomationTemplateVersion with admin CRUD + workspace clone - GET/POST /templates/ workspace catalog; POST /templates/:slug/clone - Admin: GET/POST /admin/templates, versions, publish endpoints - Alembic migration g7h8i9j0k1l2 + merge migration 2163b9b16da8 (M20+M27) - Frontend: automations-api.ts, templates-api.ts; admin/templates pages - All 57 tests passing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>d4d1956
-
feat: Mission 21 β Settings Center + Data-Driven Dropdownsβ
Ashraf Al-Kassem +1: Claude Opus 4.6- Add PATCH /auth/me for user profile updates with audit logging - Add 8 new catalog endpoints (timezones, languages, ai-models, dedupe-strategies, event-sources, event-outcomes, audit-actions, contact-fields) - Create LookupsProvider context + useLookups() hook for bulk catalog preload - Restructure Settings page with Profile section (name edit, email verification badge) - Replace 10 hardcoded dropdowns across 5 frontend pages with catalog data - Sidebar shows real user name + computed initials from /auth/me - 141 tests passing (+23 new), zero TS build errors Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>c626151 -
feat: Mission 19+20 β Catalog Standardization + Prompt Studio Knowledge Base v2 + Dynamic Lead Qualificationβ
Ashraf Al-Kassem +1: Claude Opus 4.6Mission 19: Catalog registry with standardized provider/trigger/action metadata, validation, and frontend catalog client. Mission 20: Single source-of-truth prompt compiler replacing two divergent AI context paths. Knowledge files now injected into AI context. Automation AI steps use goal/tasks/extra_instructions. Dynamic lead qualification with workspace-level questions/statuses and admin defaults. - 118 tests passing (was 57), frontend build clean Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>9d062e9 -
feat: Mission 18 β High-Volume Runtime Event Trailβ
Ashraf Al-Kassem +1: Claude Opus 4.6Unified runtime event logging across all subsystems (webhooks, runtime execution, dispatch, email, inbox, Zoho sync) with retention policies, correlation IDs, and support replay capabilities. - RuntimeEventLog model with 4 composite indexes + JSON related_ids - Non-throwing log_event() service with payload redaction (SG.*, Bearer, truncation) - Instrumented ~30 flows: webhook (5), runtime (8), dispatch (6), inbox (2), email (3) - Support Timeline API: workspace-scoped with JSON path filters - Admin Runtime Events: cross-workspace list/detail with full filter set - Frontend: TimelinePanel in inbox + admin runtime-events page - Celery beat daily purge (03:00 UTC, batch 1000) - Alembic migration e5f6g7h8i9j0 - 8 unit tests + 98 E2E tests passing Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>eab9f11
-
feat: Mission 17 β Enterprise Audit Logging Frameworkβ
Ashraf Al-Kassem +1: Claude Opus 4.6- Extend AdminAuditLog with 9 new columns (actor_type, outcome, ip_address, user_agent, request_path, request_method, error_code, error_message, agency_id) - Make actor_user_id nullable for failed login attempts on unknown users - Create audit_event() service with auto IP/UA/path extraction, metadata redaction, field truncation, and non-throwing error handling - Instrument 29 handlers across 8 files: auth (5), workspaces (4), integrations (3), automations (2), dispatch (1), inbox (2), admin (6), agency (6) - Add workspace-scoped GET /audit-logs endpoint with 7 filters + detail - Enhance admin GET /admin/audit-log with workspace_id, agency_id, actor_type, outcome, date range, and correlation_id filters + detail endpoint - Build dashboard Activity Log page with action/outcome badges, filters, expandable rows, and pagination - Enhance admin audit log page with actor type badges, correlation ID copy, request/IP/error detail view - Add 20 new tests (85 total pass, 0 fail) Co-β¦6d44285 -
Update frontend settings pages
Ashraf Al-Kassem01feb7e -
Ready for deployment to HF and GitHub
Ashraf Al-Kassema3ba894 -
feat: Mission 14+15 β commercial entitlements + agency reseller modelβ
Ashraf Al-Kassem +1: Claude Opus 4.6Mission 14: Plan-based entitlements with per-module hard limits, usage metering, and admin plan management UI. Adds Plan, PlanEntitlement, WorkspacePlan, and UsageMeter models. Entitlement enforcement service with check_and_increment/batch helpers. Admin /plans CRUD page. Mission 15: Agency reseller model enabling multi-workspace management. Adds AgencyAccount, AgencyMember, WorkspaceOwnership models with RBAC (owner/admin/operator/viewer roles). Agency router with 9 endpoints for lifecycle, member management, and workspace provisioning. Lazy WorkspaceMember provisioning via extended get_active_workspace(). max_workspaces limit enforcement via plan entitlements. Admin agency management (list/detail/suspend/plan-assign). Frontend agency console and workspace switcher replacing hardcoded placeholder. All 56 unit tests pass. 55/55 E2E checks verified on localhost. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>2bb79a1 -
fix: email verification and password reset links return 404β
Ashraf Al-Kassem +1: Claude Opus 4.6Two issues caused all email links (verification + password reset) to 404: 1. APP_BASE_URL defaulted to http://localhost:3000 in production, so all email links pointed to localhost instead of the HF Space domain. Fix: Set ENV APP_BASE_URL in Dockerfile to the production URL. 2. No /verify-email frontend page existed β the email template linked to it but Next.js returned 404. Fix: Create verify-email/page.tsx at root level (outside auth group to avoid redirect-to-dashboard for logged-in users). Page reads the token from URL, calls GET /auth/verify-email, shows success/error. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>cfd01d8 -
fix: eliminate 307 redirects that break login and API calls behind HF proxyβ
Ashraf Al-Kassem +1: Claude Opus 4.6The previous trailing-slash normalization in api.ts inadvertently broke login (POST /auth/login/ β 307 β /auth/login, losing FormData). Root cause: FastAPI routes defined as @router.get("/") only match paths WITH trailing slash, causing 307 redirects for requests WITHOUT one. Behind HuggingFace's reverse proxy, these redirects silently fail. Fix: Change route definitions from "/" to "" so they match the exact paths the frontend sends (no trailing slash). Revert the frontend trailing-slash hack. Routes fixed: prompt_config (GET, POST), integrations (GET), workspaces (GET, POST), automations (GET). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>721b3fc -
fix: resolve Prompt Studio and Integration Hub frontend failuresβ
Ashraf Al-Kassem +1: Claude Opus 4.6- Add trailing slash normalization to api.ts and admin-api.ts to prevent FastAPI 307 redirects that fail behind HuggingFace's reverse proxy - Add production origin (hf.space) to CORS allow_origins in main.py - Fix Integration Hub silent failure: show all provider cards with error banner when backend is unreachable instead of blank page Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>38213a5
-
feat: LeadPilot β full project commit (Missions 1β13)β
Ashraf Al-Kassem +1: Claude Sonnet 4.6Backend (FastAPI + SQLModel + Alembic, Python 3.9): - Auth: signup, login, forgot/reset, email verification, OAuth (Google) - Workspace management + multi-tenancy + member invites - Integrations: Zoho CRM, WhatsApp, Meta webhooks - Automation engine: flows, versions, execution engine - Prompt studio: configs, versions, test chat - Email system: SendGrid/SMTP/console, outbox, audit log - Dispatch queue: outbound messaging + retry/dead-letter - Inbox + human takeover - Analytics + diagnostics - Admin control plane: RBAC, module toggles, impersonation (Mission 13) - 57 tests, all passing Frontend (Next.js 16 + React 19 + TypeScript + Tailwind 4): - Full product UI across all missions - Admin portal: login, users, workspaces, modules, audit log, monitoring Deployment: Docker, nginx, HuggingFace Spaces, GitHub Actions CI Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>8d7950f