@seldonframe/mcp 1.3.2 → 1.3.4

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 (2) hide show
  1. package/package.json +3 -1
  2. package/src/welcome.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,8 @@
1
1
  {
2
2
  "name": "@seldonframe/mcp",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
+ "description": "MCP server for SeldonFrame — AI-native Business OS platform. v1.3.4: ROOT-CAUSE the last 3 'wrong default everywhere' bugs from the Iron & Oak Barbershop test by extending CRMPersonality with two new LLM-populated fields + closing the booking → CRM kanban loop. (FIX A — booking metadata personalization) Pre-1.3.4 the booking calendar showed 'Free consultation / 30-minute conversation' for ANY niche not in personalityBookingDefaults (only 7 hardcoded verticals — barbershop, photography, accounting, tutoring, etc. all leaked the general.json template default). New optional CRMPersonality.booking field { title, description, duration_minutes, location_kind } populated by the LLM via the personality generator's prompt. createAnonymousWorkspace applies it as the highest-priority source (LLM > personalityBookingDefaults > JSON template). location_kind enum mirrors the blueprint's eventType.location.kind exactly (on-site-business / on-site-customer / phone / video / hybrid) so there's zero translation. (FIX B — hero image relevance) Pre-1.3.4 every workspace whose vertical wasn't in the curated IMAGES map fell back to GENERAL_IMAGES (hand-picked CONTRACTOR photos — bizarre for nail salons, tutoring, barbershops). New optional CRMPersonality.images.hero_query field — free-text Unsplash search query the LLM picks per-niche ('barbershop interior', 'math tutoring student', 'nail salon manicure'). New resolveHeroImageUrlForQuery function tries the official Unsplash API first when UNSPLASH_ACCESS_KEY is set, then falls back to source.unsplash.com keyless redirect. applyPersonalityImagesToSchema is now async and prefers LLM > curated > skip. (FIX C — bookings appear in CRM kanban) Pre-1.3.4 submitPublicBookingAction inserted into bookings + activities + contacts but NEVER into deals — so the visitor's confirmed appointment never appeared in /deals where operators actually triage their pipeline. v1.3.4 calls ensureDefaultPipelineForOrg (lazy-seeds when missing) and INSERTs a deal at the first stage on every successful free booking, with customFields.bookingId for reconciliation against future booking events. Wrapped in try/catch + structured public_booking_deal_created/_failed events — a deal-insert failure does NOT roll back the booking. (VALIDATOR) +3 new checks: hero_image_loadable (asserts the rendered URL belongs to a known Unsplash host pattern + has sizing params), booking_title_personalized (asserts the booking title doesn't contain 'Free consultation' / '30-minute conversation' AND uses the personality's title if declared), booking_to_deal_pipeline_ready (asserts the org's first pipeline stage has a non-empty name so deal-insertion lands in a renderable kanban column). ⚠️ BACKEND REDEPLOY REQUIRED. Optional: set UNSPLASH_ACCESS_KEY on Vercel to use the official API for hero images instead of the keyless source.unsplash.com redirect.",
5
+ "description": "MCP server for SeldonFrame — AI-native Business OS platform. v1.3.3: ROOT CAUSE for the recurring 'wrong personality everywhere except landing' bug pattern + booking observability + per-service enrichment. (FIX 1) The booking POST /api/v1/public/bookings was returning 400 with literally NO LOGS ('No logs found for this request' in Vercel UI). Every reject path now emits a single-line structured JSON event (event: public_booking_rejected, reason: <stable_id>, ...context) so we can finally see WHICH validation is rejecting bookings. submitPublicBookingAction got the same treatment: every throw now logs reason + booking context (org_slug, weekday_in_workspace_tz, slot_local_hhmm, day_start, day_end, ...). The next time someone hits 'Couldn't book that time', the Vercel log will name the exact cause. (FIX 2 — REAL ROOT CAUSE) The LLM-generated CRMPersonality from create-full.ts was being THROWN AWAY by createAnonymousWorkspace — which called selectCRMPersonality (keyword-based) internally, ignoring the resolved personality. So booking template + intake form + landing seed all used the keyword-fallback personality (e.g. 'general' for nail salons → 'Get in Touch' intake title, 'New Lead → Quoted → ...' pipeline) while only the post-seed defensive override updated settings.crmPersonality with the LLM personality. Result: rendered intake HTML never had the personality title; that's why intake_title_rendered_html: FAIL kept appearing. Fix: createAnonymousWorkspace now accepts an opts.personality parameter; create-full.ts passes the LLM-resolved personality through. Booking template + intake form + landing seed all use the LLM personality from the start. (FIX 3a) Light mode is now the default fallback when personality.theme.mode is unset — premium verticals must opt in to dark via theme.mode='dark'. Previously the fallback used the BusinessType heuristic which routed saas/agency to cinematic (dark) by default. (FIX 3d/e) New optional services_enrichment field on CRMPersonality: array with one entry per operator service { service_name, description, icon }. The LLM is prompted to populate it with customer-facing descriptions + distinct icons per service from a known allowlist. Pipeline merges descriptions onto soul.offerings (so service cards show body copy) and overrides applyServiceIconsFromPersonality (so each card has a distinct LLM-picked icon instead of the keyword classifier's homogenous defaults). ⚠️ BACKEND REDEPLOY REQUIRED. Run a niche test post-deploy: every personality_resolved log line now also tells you whether bookings persist (public_booking_succeeded) or why they reject (public_booking_rejected with reason).",
4
6
  "description": "MCP server for SeldonFrame — AI-native Business OS platform. v1.3.2: 3 fixes from the Bright Futures Tutoring test. (FIX 1, CRITICAL) Hardcoded model 'claude-3-5-sonnet-latest' returns 404 from the Anthropic API; every LLM personality call fell through to keyword fallback (coaching for everything that wasn't a known vertical). Replaced with ANTHROPIC_MODEL env var (default: claude-sonnet-4-20250514) + ANTHROPIC_MODEL_FALLBACK (default: claude-3-5-haiku-20241022) + a 404-detection retry that swaps to the haiku fallback. Model id is logged in the personality_resolved event so prod observability shows which model is actually serving. Zero-deploy rotation: when Anthropic retires another model, set the env var on Vercel and the next request picks it up. (FIX 2) Booking confirmation rejected every valid slot with 'Selected slot is no longer available'. Root cause: the strict slot inclusion check compared format strings produced from server-local time (Vercel = UTC), but the client picked the slot in the workspace's timezone (e.g. 4pm Vancouver). The UTC ISO landed on the server as 23:00 UTC, formatted as 'YYYY-MM-DDT23:00', which never appeared in the server-generated slot list (UTC 09:00–16:30). Replaced with timezone-aware validation: derive workspace-local components via Intl.DateTimeFormat.formatToParts (new partsInTimezone helper), check the day-of-week is enabled, the time-of-day is within business hours, the slot aligns to a 15-minute boundary, and there's no overlap with existing bookings. Works regardless of where the server runs. (FIX 3) Light mode is now the default. Added theme.mode ('light'|'dark') to CRMPersonality. Populated for the 7 hardcoded verticals: medspa+agency stay dark/cinematic; everything else (general, hvac, dental, legal, coaching) renders in light/clean. The LLM personality generator's prompt now instructs the model to choose 'light' for trades/tutoring/professional-services and 'dark' only for premium/luxury/aesthetic verticals. seedLandingFromSoul reads personality.theme.mode and selects the cinematic vs clean PagePersonality accordingly. ⚠️ BACKEND REDEPLOY REQUIRED + set ANTHROPIC_MODEL=claude-sonnet-4-20250514 in Vercel.",
5
7
  "description": "MCP server for SeldonFrame — AI-native Business OS platform. v1.3.1: 3 pipeline integration bugs fixed at the consumer side. The personality system, validator, cache all worked correctly — but downstream pipeline steps consumed the data from the wrong field shape (or didn't consume it at all). (BUG 1) booking metadata.availability was being written as {weekdays:[],startHour,endHour} but the booking actions read {monday:{enabled,start,end},...} (full day names). The shape mismatch silently fell back to defaults that happened to give Mon-Fri 9-17, masking the bug for happy paths but breaking per-personality booking hours (HVAC's Mon-Sat 7-19 was never honored), the React fallback path, and the validator. Fixed by sourcing canonical schedule from blueprint.booking.availability.weekly via buildAppointmentAvailabilityFromBlueprint. (BUG 2) personality.intake.title (added v1.1.9) only updated the DB row's name column; the rendered Formbricks HTML reads blueprint.intake.title which still had the JSON template's 'Tell us about your project'. Fixed by mutating seedBlueprint.intake.title + intake.questions from personality.intake + intakeFields in createAnonymousWorkspace, parallel to the booking eventType mutation. (BUG 3) getPersonalityImages returned null for unknown verticals — for v1.3.0 LLM-generated personalities (vertical='roofing'/'pet-grooming'/etc) the IMAGES map had no entry, so workspaces shipped text-only heroes. Fixed by falling back to the GENERAL_IMAGES bundle so every workspace gets industry-neutral photography. (VALIDATOR) +4 new checks: booking_availability_enabled_days (canonical shape), booking_renderer_data_island, hero_background_image, intake_title_rendered_html — every regression at any of the 3 integration points now surfaces in Vercel function logs. ⚠️ BACKEND REDEPLOY REQUIRED.",
6
8
  "description": "MCP server for SeldonFrame — AI-native Business OS platform. v1.3.0: LLM-generated personalities (the real Karpathy move). Hardcoding 7 personalities + a 'general' fallback (v1.2.0) doesn't scale to the long tail — pet grooming, photography, accounting, tutoring, and a hundred other niches will each fall into 'general' and produce mediocre output. v1.3.0: model GENERATES the personality, validator GATES the quality, cache SCALES the cost. Three-layer resolve: (1) cache: SELECT from new personality_cache table by stable business_type_key derived from services+description (e.g. 'roofing', 'pet-grooming', 'wedding-photography'). Hit → return cached schema, increment usage_count, zero LLM cost. (2) LLM: Claude generates a custom CRMPersonality for THIS specific business via a few-shot prompt with 4 hardcoded personalities as examples. Output validated by checkPersonalityCompleteness (intake.title, ≥3 FAQs, exactly 4 trust badges, ≥4 pipeline stages, etc.). Retry once on validation fail with errors appended to prompt. On success, INSERT into cache (ON CONFLICT DO NOTHING handles parallel-create races). (3) Fallback: existing keyword-based selectCRMPersonality if LLM unavailable / fails twice. Hardcoded personalities (general, hvac, dental, legal, agency, coaching, medspa) become SEED CACHE rows + few-shot examples — they're the warm starting point, not the final system. Cost model: ~$0.01 first workspace per niche; subsequent workspaces $0. Quality model: every cached schema passed completeness check. Anti-fragile: gets better as Claude gets better, no code changes. New observability: workspace_created_full event tags personality_source (cache/llm/fallback) + personality_cache_key for cache-hit-ratio analytics. ⚠️ BACKEND REDEPLOY REQUIRED + run migration 0035_personality_cache.sql.",
package/src/welcome.js CHANGED
@@ -8,7 +8,7 @@
8
8
  // stripped. `create_full_workspace` is the only workspace-creation
9
9
  // path mentioned anywhere in this briefing.
10
10
 
11
- export const VERSION = "1.3.2";
11
+ export const VERSION = "1.3.3";
12
12
 
13
13
  export const WELCOME_MARKDOWN = `# SeldonFrame — create a real Business OS in one conversation
14
14