@seldonframe/mcp 1.28.4 → 1.28.6
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.
- package/package.json +2 -1
- package/src/welcome.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seldonframe/mcp",
|
|
3
|
-
"version": "1.28.
|
|
3
|
+
"version": "1.28.6",
|
|
4
|
+
"description": "MCP server for SeldonFrame — AI-native Business OS platform. v1.28.6: KARPATHY MODE FOR VALIDATOR RECOVERY — LLM regeneration on critical-fail + extended no_pii_leak trusted source + actionable eval surface (CRM-side; MCP package version bumped for SemVer hygiene). PROBLEM (from real-world dogfood): Cypress Pine HVAC chatbot stuck at 75% eval pass rate after 4 blueprint iterations (v4 → v7) couldn't promote to live. Two failure paths converged: (a) The runtime's one-size-fits-all safe fallback ('Let me check on that for you and have someone follow up. What's the best email to reach you at?') is right for runtime errors but WRONG for adversarial probes — asking for the visitor's email after a PII probe is awkward + trips its own validator on subsequent turns. (b) no_pii_leak validator's trusted source was conversation-history-only — when the agent legitimately surfaced operator's OWN business email/phone (the whole point of a website chatbot), validator flagged as a leak. Operators can't fix either via blueprint tuning — both are platform-owned. Claude Code correctly tried 4 times, correctly stopped. Architecture trapped it. PHILOSOPHY (Karpathy mode applied): the static fallback was COMPETING with the LLM's judgment. Better models produce better recoveries when given corrective context — hardcoded templates degrade as models improve, the opposite of antifragility. The right move: trust the model, give it rich corrective context, let it regenerate. WHAT SHIPS: (1) NEW lib/agents/fallbacks.ts. Pure-data registry mapping validator names to { correction (LLM regeneration prompt), finalFallback (last-resort static text), fixHint (operator-facing UI hint) }. 6 entries: quotes_only_from_soul_pricing, no_prompt_injection_echo, no_pii_leak, no_avoid_words, response_length_under_cap, no_hallucinated_state_change. composeCorrectionPrompt(failedNames) builds an [INTERNAL CORRECTION:...] block listing each violation as a bullet — the LLM sees ALL fired validators in one regeneration request. selectFinalFallback(failedNames) picks the highest-priority entry's static fallback (no_pii_leak > pricing > injection > hallucinated_action > length > avoid_words) when regeneration also fails. (2) RUNTIME REGENERATION (lib/agents/runtime.ts). When critical validator fires post-turn: (a) compose correction prompt from fired validators, (b) append synthetic [INTERNAL CORRECTION:...] user message to messages[], (c) call anthropic.messages.create with same system + messages + correction (no tools — just want clean text), (d) re-run validators on regenerated text. If clean → use regenerated response. If still critical-fail → use selectFinalFallback (per-validator static, NOT the v1.27.x one-size-fits-all). Token budget: ≤1 regeneration retry; bounded ~512 max_tokens on the regen call. ~2x token cost on critical-fail turns vs v1.28.5; for typical operators with healthy agents, critical-fails are rare so amortized cost is low. (3) no_pii_leak EXTENDED TRUSTED SOURCE. ValidatorContext.soul gains optional contact: { email, phone }. Runtime passes soul.contact through. Validator's trustedSource string now includes operator's business email/phone. The agent surfacing 'you can reach us at info@cypresspine.com' no longer flags as a leak — it's the agent's job to share business contact info. (4) /agents/[id]/evals SURFACE FIX (evals-client.tsx). Failed scenarios now show the agent's actual response inline (not behind a <details> collapse) + a 'How to fix' panel with per-validator hints (e.g. 'add the missing service to your pricing facts' / 'soul.contact may need an email' / 'this typically self-corrects on regeneration'). Operators (and Claude Code reasoning about the workspace) see the diagnostic data without clicking. PHILOSOPHY CHECK: every change here is moving HARDCODED HEURISTICS → MODEL JUDGMENT or → MORE DATA. Static fallback → LLM regeneration with rich context. Trusted-source-too-narrow → trust the operator's own contact info. Hidden eval details → surface them. As Claude (and successor models) get better, regeneration produces better recoveries (we don't maintain N hardcoded fallbacks); architecture stays stable. NO migrations, NO new env vars. Backend redeploy required. EXPECTED IMPACT on the conversation that triggered this fix: when the PII probe scenario fires + the agent generates the reflexive 'what's your email?' fallback, the regeneration pass with the corrective prompt produces a clean refusal like 'I'm not able to share other customers' info, but I'm happy to help with your own questions.' — passing the eval. Eval pass rate from 75% → 87.5%+ for typical workspaces. Operators see WHY each scenario failed inline; Claude Code can route to the right fix without inferring.",
|
|
4
5
|
"description": "MCP server for SeldonFrame — AI-native Business OS platform. v1.28.4: POST-BOOKING 24h REMINDER VIA VERCEL WORKFLOWS — first SF use of Vercel Workflow DevKit. CRM-side change; MCP package version bumped for SemVer hygiene. PROBLEM: SF had no post-booking reminder mechanism. Operators in HVAC / dental / coaching verticals see ~10-15% no-show rates without reminders. The existing workflow_runs system (which powers /automations archetypes) is Soul-integrated for rule-based pattern matching; not the right shape for 'fire on event, sleep N hours, do thing' durable flows. PHILOSOPHY: lean on commodity infrastructure where SF doesn't compound. Durable execution + sleep-without-burning-compute is commodity (Vercel Workflows handles it). SF's compounding edge is Soul + Brain + Agent — not workflow plumbing. The user explicitly directed this in earlier reflection: 'use Vercel Workflows for any new durable flow; NOT a rewrite of existing workflow_runs.' WHAT SHIPS: (1) WORKFLOW PACKAGE INSTALLED. pnpm add workflow @workflow/next in packages/crm. next.config.ts wrapped with withWorkflow() from workflow/next so the build pipeline compiles 'use workflow' / 'use step' files into durable code. (2) NEW lib/workflows/booking-reminder.ts. Per Vercel WDK conventions: workflow function (sandboxed VM, no Node.js APIs, 'use workflow' directive) does ONLY orchestration. All real work (DB queries, SMS/email sends, activity inserts) lives in step functions ('use step' directive, full Node.js access). The workflow: (a) loads booking via loadBookingForReminder step, (b) early-returns if status != 'scheduled' OR if <24h to startsAt, (c) sleeps with workflow.sleep(new Date(startsAt - 24h)) — durable, no compute consumed during the sleep, (d) re-fetches the booking after sleep (it may have been cancelled or rescheduled in the meantime; if rescheduled to >25h out we skip and let a future scheduled run pick it up), (e) calls sendReminder step which checks workspace integrations: hasTwilio → sendSmsFromApi via lib/sms/api with the contact's phone; else hasResend → sendEmailFromApi via lib/emails/api; else returns 'no_channel_configured', (f) writes an activity row via logReminderActivity step (type='reminder_sent_sms' / 'reminder_sent_email' / 'reminder_skipped' with the reason). (3) WIRED INTO submitPublicBookingAction. Right after emitSeldonEvent('booking.created', ...), the action does: const { start } = await import('workflow/api'); await start(bookingReminderWorkflow, [bookingId]). Fire-and-forget — start() returns immediately. Errors caught + logged so workflow trigger failures don't fail the booking creation itself. (4) ALONGSIDE existing workflow_runs system. workflow_runs powers /automations archetype configurator (Soul-integrated rule-based patterns); booking-reminder is a generic durable flow that doesn't need Soul. Both coexist. NO migrations. NO new env vars on the SF side, BUT requires Vercel Workflow infrastructure on the deployment side — Vercel Workflows is included in Vercel platform; no marketplace install needed. Backend redeploy required (Vercel detects the new workflow on next build via withWorkflow + lib/workflows/ scan).",
|
|
5
6
|
"description": "MCP server for SeldonFrame — AI-native Business OS platform. v1.28.3: SKILL-PACK ARCHITECTURE (CRM-side; MCP package version bumped for SemVer hygiene). Refactor with NO behavior change — same composed system prompt, different code shape. PHILOSOPHY (Karpathy / antifragile / thin-harness-fat-skill): behavioral guidance for agents (the FAT SKILL layer) belongs in markdown-style skill FILES, not inline string concatenation in prompt.ts. To improve agent intelligence, edit a skill file. No code change to the composer or runtime. As Claude (and successor models) get better at multi-turn memory, temporal reasoning, and avoiding hallucinated actions, we EDIT prose; architecture stays stable. Smaller models lean on verbose skills; larger models need terse ones. Same architecture either way. WHAT SHIPS: (1) NEW lib/agents/skills/<archetype>/<skill-id>.ts files. Each is a default-export string of markdown-shaped content. v1.28.3 ships 3 skills for the website-chatbot archetype: temporal-reasoning.ts (templated; uses {{currentDate}}, {{currentTime}}, {{timezone}} placeholders), be-smart-by-default.ts (the 7 behavioral rules introduced in v1.27.7-v1.27.8), hard-rules.ts (the 8 non-negotiable safety invariants). (2) NEW lib/agents/skills/registry.ts. Ordered REGISTRY array of {id, content, archetypes[], renderVars[]} entries. Functions: getSkillsForArchetype(archetype) returns ordered skills applicable to that archetype; renderSkill(skill, vars) substitutes {{placeholder}} tokens with values from a vars dict (unknown placeholders left intact, visible as a debug hint). (3) REFACTORED prompt.ts. composeSystemPrompt now: imports getSkillsForArchetype + renderSkill from registry; computes skillVars (currentDate, currentTime, timezone from workspace tz); emits 'up-front' skills (temporal-reasoning, be-smart-by-default) before dynamic operator content; emits 'hard-rules' AFTER dynamic content (so safety invariants are the final word the LLM reads — anchoring effect). The previous ~50 lines of inline backtick-string-concatenated prose are gone, replaced by 6 lines of registry iteration. (4) BEHAVIORAL OUTPUT IS IDENTICAL to v1.28.2. The skill files contain the EXACT same prose that was inlined; the registry orders them the same way the inline code did. Verifiable via tsc + comparing System prompts byte-for-byte. EXTENSIBILITY: adding a new behavioral skill = create skills/<archetype>/<id>.ts + add a registry entry. Zero changes to composer or runtime. Renaming an existing skill = move file + update registry + update import; prompt output identical. Voice + SMS archetypes can introduce specialized skills (skills/voice-receptionist/no-emojis.ts, skills/sms-followup-bot/under-160-chars.ts) without composer code changes. NO MCP tool changes. NO migrations. NO new env vars. Backend redeploy required.",
|
|
6
7
|
"description": "MCP server for SeldonFrame — AI-native Business OS platform. v1.28.2: EMBED WIDGET POLISH (CRM-side; MCP package version bumped for SemVer hygiene). The /api/v1/public/agent/<slug>/embed.js IIFE that renders on operators' websites — first impression for end customers — was functional but plain. v1.28.2 brings it to world-class without forking a hosted-app codebase like mckaywrigley/chatbot-ui (wrong shape — that's a full Next.js app, we need a single <script> tag with zero deps on the operator's site). Polish in 5 categories: (1) MARKDOWN RENDERING. Inline parser in the IIFE handles **bold** → <strong>, *italic* → <em>, `code` → <code>, [text](https://...) → <a target=_blank rel=noopener noreferrer>, '- bullet' lines → <ul><li>, and \\n → <br>. All output goes through escapeHtml() FIRST then sanctioned tags re-injected — no raw HTML survives. SSE-friendly: re-renders innerHTML on every delta so bold/links resolve as soon as the closing token arrives. Inline CSS for strong/em/a/code/ul/li within .sf-agent-msg.assistant. (2) MOBILE-FIRST. Below 640px breakpoint the panel becomes FULL-SCREEN (Intercom pattern) — no rounded corners, fills viewport. Bubble shifts to bottom-right corner with smaller margin. Bigger touch targets throughout. (3) BRAND INHERITANCE. Header now shows the operator's logo if workspace.theme.logoUrl is set (https://... only — schema-validated server-side); falls back to a colored circle with the first letter of the org name. Logo container has bg=rgba(255,255,255,.18) so it sits cleanly on top of the operator's primaryColor header. (4) A11Y. role=dialog + aria-label on panel; role=log + aria-live=polite + aria-relevant=additions on messages region (announces new agent messages without spamming during streaming); screen-reader-only label on the textarea; aria-expanded toggles on the bubble; ARIA-labels on every control. Esc key closes panel + returns focus to bubble (focus management). focus-visible outlines on all interactive elements with proper offset. prefers-reduced-motion media query disables all transitions and animations. (5) ANIMATIONS + UX. Bubble: spring scale (cubic-bezier(.34,1.56,.64,1)) on hover (1.08x) + active (.95x). Panel: spring slide-up reveal — opacity 0 + translateY(8px) + scale(.98) → opacity 1 + 0 + 1 in 280ms. Messages: per-message fade+slide-in (220ms). Typing indicator: 3 animated bouncing dots (was 'Typing...' text). Textarea (was input) auto-grows to 120px max-height; Enter sends, Shift+Enter newline. Send button has translateY hover + scale active feedback. NO MCP tool changes. NO migrations. NO new env vars. The embed.js endpoint is automatically picked up on the next page load — operators don't need to update their script tag (the URL is stable; the response body changes server-side). Backend redeploy required.",
|
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.28.
|
|
11
|
+
export const VERSION = "1.28.6";
|
|
12
12
|
|
|
13
13
|
export const WELCOME_MARKDOWN = `# SeldonFrame — create a real Business OS in one conversation
|
|
14
14
|
|
|
@@ -433,4 +433,4 @@ admin dashboard. Pre-fills their email automatically.
|
|
|
433
433
|
<https://seldonframe.com> · **Discord:** <https://discord.gg/sbVUu976NW>
|
|
434
434
|
`;
|
|
435
435
|
|
|
436
|
-
export const FIRST_CALL_BANNER = `🚀 SeldonFrame v1.28.
|
|
436
|
+
export const FIRST_CALL_BANNER = `🚀 SeldonFrame v1.28.6 is connected. STEP ZERO: for any workspace task call get_workspace_state({workspace_id}) FIRST — returns workspace identity + integrations status + agents with inline health stats + counts + tailored next_steps in ONE round-trip. Replaces 4-6 progressive discovery calls. ANTI-PATTERNS: don't ls/cat/read .env (SF is hosted, not local files); don't check node/npm versions (irrelevant); don't ask 'is Anthropic key configured?' (state response tells you); don't create a duplicate agent (state response shows existing ones — use update_website_chatbot instead of build_website_chatbot when one exists). Token-budget concept removed in v1.27.9 — ignore stale references. CAPABILITY MAP — pick the right primitive BEFORE exploring tools: (a) "build me a website" → WORKSPACE → create_workspace_v2 + block tools. (b) "add a chatbot to my website / landing page" → AGENT (web chat) → build_website_chatbot (v1.28+ skill bundle: configure_llm + create_agent + publish-test in 1 call; auto-detects ANTHROPIC_API_KEY from env). Drop to primitives (configure_llm_provider + create_agent + publish_agent) only for custom flows. CRITICAL ANTI-PATTERN: chat widgets are NOT blocks. Don't search list_blocks for chat — chat agents are a separate primitive (v1.26+). (c) "auto-reply to inbound SMS/email" → CONVERSATION → send_conversation_turn (one-shot Soul-aware reply, not a website widget). (d) "add hero/services/faq/cta section" → BLOCK → get_block_skill + persist_block. (e) "send campaign email/sms" → MESSAGING. (f) CRM ops → list_contacts/create_deal/etc. CHATBOT CANONICAL FLOW (v1.28+ — 1 call instead of 5): build_website_chatbot({workspace_id, name, faq, pricing_facts, greeting}) → wraps configure_llm + create_agent + publish-test in one call, auto-detects ANTHROPIC_API_KEY from env. Then: operator sandbox-tests at /agents/[id]/test → publish_agent({status:"live"}) auto-runs 8-scenario eval gate (≥87.5% pass required). Observability tools after publish: list_agents, tail_agent_conversations, get_agent_conversation, get_agent_metrics, run_agent_evals, replay_conversation. Dashboard surfaces /agents, /agents/[id]/test, /agents/[id]/settings, /agents/[id]/evals, /agents/[id]/conversations let operators iterate without leaving the browser. WORKSPACE FLOW (legacy reference): create_workspace_v2 → IN PARALLEL for all 7 recommended_blocks (hero, services, about, faq, cta, booking, intake): get_block_skill + persist_block → complete_workspace_v2 → finalize_workspace({workspace_id, email}). Run blocks in PARALLEL (Promise.all) — sequential takes 60+ seconds. v1.10+ CUSTOMIZE: regenerate_block, upload_workspace_image (image_url preferred over base64). v1.11+ STRUCTURAL: get_landing_structure, move_section, delete_section. v1.12+ COMPOSITES: add_composite_section / update_composite_section — manifest ANY block from 12 low-level primitives. Skipping finalize_workspace leaves the operator with no admin login. Every URL is real. NEVER create local files.`;
|