Spaces:
Running
Running
Commit History
-
Fix sqlite database lock in ADK runner testsβ Running
Ashraf Al-Kassem +1: Claude Sonnet 4.6Mock LeadPilotSessionService in all run_for_contact tests to prevent a second DB connection from conflicting with the test session's open write transaction on SQLite (which only allows one writer at a time). Affected: test_run_for_contact_marks_completed, test_run_for_contact_marks_failed_on_error, test_run_for_contact_tool_call_produces_step_log_and_events, test_run_for_contact_exception_marks_instance_failed, test_wait_delay_instance_resumes_and_completes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>803e992 -
Fix CI: remove unused variable (ruff F841) + pin depsβ
Ashraf Al-Kassem +1: Claude Sonnet 4.6- orchestrator.py: remove unused `conversation` variable + `Conversation` import (ruff F841 was breaking lint step) - requirements.txt: add `ruff` explicitly + pin `google-adk==1.27.3` Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>579d421 -
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 M-C β Session & Memoryβ
Ashraf Al-Kassem +1: Claude Sonnet 4.6Replace InMemorySessionService with LeadPilotSessionService backed by a new AgentSession DB table. ADK sessions now persist across webhook events and server restarts β agents resume mid-qualification without re-asking answered questions. - Add AgentSession model (state+events JSON, soft-delete) - Alembic migration r8s9t0u1v2w3 creates agent_session table - LeadPilotSessionService: in-memory cache + DB persistence, 50-event cap - runner.py: get-or-create pattern, one-time history seeding, update_session after turn - Admin endpoint: GET /api/v1/admin/contacts/{contact_id}/session - 6 new tests (344 total, all passing) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>98b27e0 -
Fix Alembic migrations to be idempotent against create_all raceβ
Ashraf Al-Kassem +1: Claude Sonnet 4.6Root cause: SQLModel.metadata.create_all in startup scripts creates tables ahead of Alembic, causing subsequent migration runs to fail with "table already exists" or wrong table name errors. Fixes: - Mission 38: make user_identity CREATE TABLE idempotent, fix table name oauth_state β oauthstate (SQLModel uses lowercase class name), make purpose column addition idempotent - Mission M-B: make qualification_status/intent ADD COLUMN idempotent Both migrations now check column/table existence before creating, allowing alembic upgrade head to run safely on any DB state. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>e3db935 -
debug: surface test-chat session error for HF diagnosisβ
Ashraf Al-Kassem +1: Claude Sonnet 4.6Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>73428ba -
Mission M-B β Multi-Agent Orchestrationβ
Ashraf Al-Kassem +1: Claude Sonnet 4.6Replace single LlmAgent with a 5-agent hierarchy: - OrchestratorAgent routes based on lead state (qualification_status, CRM sync) - QualificationAgent: ask/mark_qualified/mark_disqualified tools - CRMAgent: upsert_zoho_lead + update_contact_field - ReplyAgent: send_reply + send_media_message (stub) - HandoverAgent: escalate_to_human + send_handover_summary (stub) tools.py refactored into named factory functions for reuse across agents. Contact model gains qualification_status + intent columns (migration q7r8s9t0u1v2). 338 tests passing (333 pre-existing + 5 new M-B tests). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>d5ba3bd -
Mission M-A β ADK Core Integrationβ
Ashraf Al-Kassem +1: Claude Sonnet 4.6Replace sequential MVP runtime with Google ADK LlmAgent + tool system. The AI now autonomously decides which tools to call (send_reply, upsert_zoho_lead, escalate_to_human, tag_contact) instead of walking a fixed node graph. Changes: - Add google-adk>=1.0.0 to requirements.txt (installed: 1.27.3) - Make ExecutionStepLog.node_id nullable (Alembic migration p6q7r8s9t0u1) - Create app/core/adk/ package: tools.py, agent.py, runner.py - tasks.py: replace execute_instance() call with run_for_contact() - runtime.py: remove execute_instance + handle_ai_reply (ADK handles AI now) - 6 new tests in test_adk_runner.py β 333/333 passing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>695c56b
-
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
-
fix(ci): remove unused WorkspacePlan import to pass ruff F401β
Ashraf Al-Kassem +1: Claude Sonnet 4.6Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>ea48905 -
fix(routing): fix broken sign-in/signup links, admin redirect, and Google OAuthβ
Ashraf Al-Kassem +1: Claude Sonnet 4.6- Website CTAs (Header, Footer, CTASection, PlanCard, plans page) now use <a href="/app/..."> for cross-app navigation β Next.js <Link> was silently doing SPA navigation within the Website, which has no /login or /signup routes. - APP_URL changed from hardcoded localhost:3000 to /app (relative, works in any env). - nginx admin redirect changed from exact-match to regex so /admin/login, /admin/users, etc. are all covered. - Google OAuth redirect_uri now includes the /app basePath prefix to match the actual callback route at /app/auth/google/callback. NOTE: Google Cloud Console must also have /app/auth/google/callback added as an authorized redirect URI for Google OAuth to work end-to-end. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>e284c06
-
fix: backfill missing 'automations' entitlement to existing plansβ
Ashraf Al-Kassem +1: Claude Sonnet 4.6seed_plans() was skipping existing plans entirely, so the 'automations' module_key was never added as a PlanEntitlement when it was introduced in a later mission. Users with valid plans received 403 ENTITLEMENT_BLOCKED when accessing templates. Fixes: - seed_plans() now upserts missing entitlements into existing plans without removing or modifying any existing rows (idempotent) - Adds MODULE_AUTOMATIONS constant to modules.py and registers it in ALL_MODULES so seed_modules() creates the SystemModuleConfig row On first deploy, startup logs will show: [seed_plans] Seeded 0 plan(s) and 3 missing entitlement(s). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>552f31a
-
fix: correct HF dataset card task_categories (remove unofficial 'conversational')β
Ashraf Al-Kassem +1: Claude Sonnet 4.6Replace 'conversational' (not in HF official list) with 'text-generation' to eliminate validation warnings on every export commit. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>afe106b -
feat: HuggingFace dataset export β ashrafkassem/leadpilot-dataβ
Ashraf Al-Kassem +1: Claude Sonnet 4.6- Add export_to_hf.py script: exports 12 automation templates + 3 plans (static) and all user-generated data (contacts, conversations, messages, flows, executions, audit logs) with PII pseudonymized via SHA-256 hashes - Add export_to_hf_task Celery Beat task (daily 02:00 UTC), no-ops silently if HF_TOKEN is not set so existing deployments are unaffected - Add HF_TOKEN and HF_DATASET_REPO settings to config.py - Link HF Space β dataset via datasets: YAML in README.md - Dry-run: python scripts/export_to_hf.py --dry-run Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1648997 -
fix: normalize timezone-aware ends_at + enrich create responseβ
Ashraf Al-Kassem +1: Claude Sonnet 4.6- Strip tzinfo from ends_at/starts_at inputs to avoid offset-naive vs offset-aware comparison error when clients send ISO8601 with Z suffix - Change create override response from flat override_id to override object {id, plan_code, starts_at, ends_at, reason} for richer client feedback Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>5e4d359 -
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: 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 33 β Marketing Website Alignment + DB-Driven Contentβ
Ashraf Al-Kassem +1: Claude Opus 4.6Convert all website pages from hardcoded static arrays to DB-driven content via public catalog API endpoints. Removes phantom "Pro" tier (website showed 4 plans, DB only has 3). Adds Templates and Integrations pages, parity audit script, and scroll-reveal design system classes. - Backend: public GET /catalog/templates endpoint (unauthenticated, 60s cache) - Website: api.ts client, moduleMap.ts for module-to-marketing mapping - Pages converted: home, plans (3 tiers), features (module-driven) - New pages: /templates (12 templates, category filters), /integrations (3 providers) - Components: FeatureCard gains iconName + comingSoon props - Nav: Header + Footer updated with Templates and Integrations links - Design: catalog-card, badge-platform, badge-category, scroll-reveal classes - Audit: scripts/parity-audit.ts verifies no fake feature claims (CI-friendly) - Tests: 3 new catalog tests (305 total passing) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>6acfd72 -
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 31 β Meta Platform: Instagram DM, Messenger, and Lead Ads Full Lifecycleβ
Ashraf Al-Kassem +1: Claude Opus 4.6- OAuth 2.0 connect flow (start + callback with JWT state, token exchange chain) - Webhook subscription API (auto-subscribe after OAuth, manual trigger endpoint) - Message normalization: Instagram DM + Messenger channel discrimination, attachment parsing - Meta delivery/read status webhooks via watermark-based updates - Lead Ads ingestion: fetch lead data from Graph API, enrich contacts - MetaAdapter: send_media implementation + get_user_profile - Dispatch service: Meta media dispatch (mirrors WhatsApp pattern) - Channel-level observability metrics (instagram/messenger discrimination) - 21 new tests (288 total), all passing + 15/15 E2E checks Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>eed40fb -
feat: Mission 30 β WhatsApp Cloud Production Hardeningβ
Ashraf Al-Kassem +1: Claude Opus 4.6- Webhook signature enforcement (HMAC SHA-256) + payload size guard (1MB) - Delivery status lifecycle: DELIVERED/READ/DEAD_LETTER statuses with forward-only progression - Phone number normalization (digits-only) to prevent duplicate contacts - Media message handling: inbound image/audio/video/document parsing + local storage - Dead-letter queue: endpoints for listing and retrying permanently failed messages - Adapter abstraction: MessagingAdapter ABC for WhatsApp and Meta adapters - Observability: in-memory metrics service + admin metrics endpoint - Celery worker fix: expire_on_commit=False prevents MissingGreenlet errors - Catalog registry updated with new delivery statuses - 21 new tests (267 total), all passing Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>f187462 -
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: resolve 149 ruff lint violations for CI pipelineβ
Ashraf Al-Kassem +1: Claude Opus 4.6- Auto-fix 104 unused imports (F401) across 40 files - Fix F821: add missing `wrap_error` import in diagnostics.py - Fix F841: remove unused `now` variables in auth.py - Fix E722: replace bare `except` with `except Exception` in dispatch - Fix re-exports: explicit `as` syntax for meta/whatsapp __init__.py - Update pyproject.toml ruff config: - Ignore E711/E712 (SQLAlchemy needs `== None`/`== False`) - Ignore E402/E701 (intentional patterns in workers/tests) - Add per-file ignores for alembic/ and tests/ All 197 tests pass. Ruff checks clean. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>b1aa633 -
fix: security hardening + stale docs + CI pipelineβ
Ashraf Al-Kassem +1: Claude Opus 4.6- Remove HF API token from git remote URL (was plaintext) - Harden Dockerfile: stop copying .env.example as production .env - Remove hardcoded Fernet key from .env.example (use placeholder) - Remove phantom ADMIN_JWT_SECRET (not used by any code) - Fix CLAUDE_CONTEXT.md: 11 factual errors (Python version, mission table, dual JWT claim, file references, docs path, CI reference) - Add GitHub Actions CI workflow (ruff + pytest) - Align pyproject.toml target-version to py311 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>ce7992e -
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 -
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: 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
-
fix: comprehensive production bug fix β admin auth, endpoints, seedingβ
Ashraf Al-Kassem +1: Claude Opus 4.6- Create admin_auth.py with POST /login and GET /me endpoints - Register admin_auth_router in main.py - Implement ~20 missing admin endpoints in admin.py (users, workspaces, webhooks, dispatch, automations, prompt-configs, zoho-health, integrations, executions, email retry, impersonation) - Fix wrap_error() calls with invalid code= kwarg (8 call sites across auth.py, admin.py, integrations.py) - Fix SQLAlchemy == None to .is_(None) in auth.py (2 places) - Seed admin@leadpilot.io / LeadPilot@password123 in create_test_user.py - Delete broken seed_admin.py and seed_rbac.py scripts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>15d9ad6 -
fix: remove broken imports in main.py that crash backend on startupβ
Ashraf Al-Kassem +1: Claude Opus 4.6- Remove import of non-existent `admin_auth` module (ImportError) - Remove import of non-existent `seed_admin` function (ImportError) - Remove `await seed_admin()` call from lifespan - Remove `admin_auth_router` registration These references were added to V2 but the corresponding code was never created, causing the FastAPI backend to crash before starting (502). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>0185de7 -
fix: add missing files that block HuggingFace Docker buildβ
Ashraf Al-Kassem +1: Claude Opus 4.6- frontend/package-lock.json: required by `npm ci` in Dockerfile Stage 1 - frontend/postcss.config.mjs: required for Tailwind CSS processing - backend/alembic/env.py: required for database migrations at runtime - backend/alembic/script.py.mako: template for generating new migrations These files were omitted from the initial project commit, causing the HuggingFace Space build to fail at Docker Stage 1 (npm ci). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>4af9840 -
fix: add missing backend application code (app/, migrations, tests, templates)β
Ashraf Al-Kassem +1: Claude Opus 4.6The initial full project commit omitted the core backend directories. This adds the complete backend application package including all API routes, models, services, workers, 10 Alembic migrations, 13 test files (57 tests), and email templates. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>8ca4657 -
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