Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: keep Runway capability and settings contracts scoped (#13105)
Adam Eivyd9d91b722692
diff --git a/client/src/components/settings/ImageGenBackendSections.jsx b/client/src/components/settings/ImageGenBackendSections.jsxindex e9a3ed0581..b39475246c 100644--- a/client/src/components/settings/ImageGenBackendSections.jsx+++ b/client/src/components/settings/ImageGenBackendSections.jsx@@ -1,4 +1,3 @@-import RunwayModelSelect from '../imageGen/RunwayModelSelect';/*** Media settings — the install-wide routing sections: the Backend tile* picker and the Defaults tab (default video backend, display sleep, the@@ -10,6 +9,7 @@ import { useState } from 'react';import { Save, Image as ImageIcon, Cloud, Cpu, AlertTriangle, Sparkles, Terminal, Check, Trash2, SlidersHorizontal } from 'lucide-react';import FormField from '../ui/FormField';import BrailleSpinner from '../BrailleSpinner';+import RunwayModelSelect from '../imageGen/RunwayModelSelect';import FalModelSelect from '../imageGen/FalModelSelect';import {IMAGE_GEN_MODE, RENDER_TARGET_BACKEND_AUTO, RENDER_TARGET_OPTIONS, VIDEO_RENDER_MODES, modeLabel,diff --git a/client/src/components/settings/ImageGenProviderSections.jsx b/client/src/components/settings/ImageGenProviderSections.jsxindex 3eff144187..0261b5ad72 100644--- a/client/src/components/settings/ImageGenProviderSections.jsx+++ b/client/src/components/settings/ImageGenProviderSections.jsx@@ -10,6 +10,7 @@*/import { useState, useEffect, useCallback, useId } from 'react';+import { Link } from 'react-router';import { AlertTriangle, Check, Sparkles, Terminal } from 'lucide-react';import FormField from '../ui/FormField';import BrailleSpinner from '../BrailleSpinner';@@ -525,7 +526,7 @@ export default function ImageGenProviderSections({ mediaTab, setMediaTab, form,{mediaTab === 'runway' && (<div className={SECTION_CLASS}><h2 className="text-lg font-semibold text-white">Runway Imagegen</h2>- <p className="text-xs text-gray-400">Uses the Runway credential from <a href="/settings/credentials" className="text-port-accent hover:underline">Settings → Credentials</a>, shared with video generation.</p>+ <p className="text-xs text-gray-400">Uses the Runway credential from <Link to="/settings/credentials" className="text-port-accent hover:underline">Settings → Credentials</Link>, shared with video generation.</p><p className="text-xs text-gray-400">{runwayCredential == null ? 'Checking credential…' : runwayCredential.configured ? 'Runway credential configured.' : 'Add a Runway credential to render.'}</p><p className="text-xs text-gray-400">{RUNWAY_IMAGE_DISCLOSURE.summary} <a href={RUNWAY_IMAGE_DISCLOSURE.termsUrl} target="_blank" rel="noreferrer" className="text-port-accent hover:underline">Runway’s terms</a> and moderation apply. {RUNWAY_IMAGE_DISCLOSURE.billing}</p><label className="flex items-center gap-3 cursor-pointer"><input type="checkbox" checked={values.runwayEnabled} onChange={toggleProvider('runwayEnabled', IMAGE_GEN_MODE.RUNWAY)} /><span>Enable Runway Imagegen</span></label>@@ -535,7 +536,13 @@ export default function ImageGenProviderSections({ mediaTab, setMediaTab, form,</select></FormField><FormField label="Resolution" labelClassName={FIELD_LABEL_CLASS}>- <select value={values.runwayResolution} onChange={(e) => set('runwayResolution', e.target.value)} className={INPUT_CLASS}><option value="720p">720p · Gen-4: 5 credits / Turbo: 2 credits</option><option value="1080p">1080p · Gen-4: 8 credits / Turbo: 2 credits</option></select>+ <select value={values.runwayResolution} onChange={(e) => set('runwayResolution', e.target.value)} className={INPUT_CLASS}>+ {['720p', '1080p'].map((resolution) => (+ <option key={resolution} value={resolution}>+ {resolution} · {RUNWAY_IMAGE_MODELS.map((model) => `${model.label}: ${formatCount(model.credits[resolution])} credits`).join(' / ')}+ </option>+ ))}+ </select></FormField><CleanersToggles mode={IMAGE_GEN_MODE.RUNWAY} form={form} /></div>diff --git a/client/src/lib/imageGenModes.js b/client/src/lib/imageGenModes.jsindex 16508759a2..23bdb2d681 100644--- a/client/src/lib/imageGenModes.js+++ b/client/src/lib/imageGenModes.js@@ -183,12 +183,12 @@ export const MODE_LABELS = Object.freeze({[VIDEO_GEN_MODE.RUNWAY]: 'Runway',});+export { RUNWAY_IMAGE_DISCLOSURE, RUNWAY_IMAGE_MODELS, RUNWAY_IMAGE_DEFAULT_MODEL, RUNWAY_IMAGE_MODEL_IDS, getRunwayImageModel } from '../../../server/lib/runwayImageModels.js';+// The fal.ai model picker rows — one per catalog family, keyed by its// text-to-image endpoint (the provider switches to the family's /edit endpoint// on its own whenever a render carries input images), labeled with its price// because each choice is a different cost per image.-export { RUNWAY_IMAGE_DISCLOSURE, RUNWAY_IMAGE_MODELS, RUNWAY_IMAGE_DEFAULT_MODEL, RUNWAY_IMAGE_MODEL_IDS, getRunwayImageModel } from '../../../server/lib/runwayImageModels.js';-export const FAL_IMAGE_MODEL_OPTIONS = Object.freeze(FAL_IMAGE_FAMILIES.map((family) => Object.freeze({id: family.textEndpoint,label: `${family.label} (${falImagePriceLabel(family)}, up to ${family.maxInputImages} refs)`,diff --git a/server/lib/validation.js b/server/lib/validation.jsindex 7a59fc32a9..a293951249 100644--- a/server/lib/validation.js+++ b/server/lib/validation.js@@ -2230,11 +2230,7 @@ export const videoModelTermsSchema = z.object({accepted: z.boolean(),});-// fal.ai Imagegen settings slice (`imageGen.fal`). The API key is NOT here —-// it is the fal.ai credential the video backend already owns (write-only via-// PUT /api/settings/credentials/fal). `model` must name a catalog endpoint-// (lib/falImageModels.js): each id is a different price, so free text is-// refused rather than persisted and discovered at render time.+// Runway images share the private video credential; only render settings live here.export const imageGenRunwaySettingsSchema = z.object({enabled: z.boolean().optional(),model: z.preprocess((v) => v === '' ? undefined : v, z.enum(RUNWAY_IMAGE_MODEL_IDS).optional()),@@ -2243,6 +2239,11 @@ export const imageGenRunwaySettingsSchema = z.object({denoise: z.boolean().optional(),});+// fal.ai Imagegen settings slice (`imageGen.fal`). The API key is NOT here —+// it is the fal.ai credential the video backend already owns (write-only via+// PUT /api/settings/credentials/fal). `model` must name a catalog endpoint+// (lib/falImageModels.js): each id is a different price, so free text is+// refused rather than persisted and discovered at render time.export const imageGenFalSettingsSchema = z.object({enabled: z.boolean().optional(),model: z.preprocess((v) => (v === '' ? undefined : v), z.enum(FAL_IMAGE_MODEL_IDS).optional()),diff --git a/server/services/fableLoom/visualConditioning.js b/server/services/fableLoom/visualConditioning.jsindex c4d4672afb..8aa4f5df4a 100644--- a/server/services/fableLoom/visualConditioning.js+++ b/server/services/fableLoom/visualConditioning.js@@ -427,6 +427,7 @@ export async function compileFableLoomVisualRequest({export function fableLoomImageCapabilities({ mode, model = null, inputBudget = 4 }) {const localFlux2 = mode === 'local' && model?.runner === 'flux2';+ const runwayCapability = mode === 'runway' ? IMAGE_GEN_PROVIDER_CAPABILITIES.runway : null;// Every cloud image backend accepts reference images (imageGenCapabilities.js).const cloudEdit = CLOUD_IMAGE_GEN_MODES.includes(mode);return Object.freeze({@@ -435,11 +436,11 @@ export function fableLoomImageCapabilities({ mode, model = null, inputBudget = 4referenceRoles: localFlux2 || cloudEdit? ['temporal-predecessor', 'character-neutral', 'character-profile', 'character-full-body', 'character-expression-gesture', 'character-wardrobe', 'character-prop-scale', 'character-negative-identity', 'character-draft-reference', 'environment', 'object']: [],- referenceBudget: localFlux2 || cloudEdit ? Math.min(inputBudget, IMAGE_GEN_PROVIDER_CAPABILITIES[mode]?.maxInputImages ?? inputBudget) : 0,+ referenceBudget: localFlux2 || cloudEdit ? Math.min(inputBudget, runwayCapability?.maxInputImages ?? inputBudget) : 0,supportsLora: localFlux2 || (mode === 'local' && model?.runner === 'mflux'),loraCompatKey: model?.loraCompatKey || null,loraBudget: 8,- multiCharacterPreservation: localFlux2 || IMAGE_GEN_PROVIDER_CAPABILITIES[mode]?.multiCharacterPreservation === true,+ multiCharacterPreservation: localFlux2 || runwayCapability?.multiCharacterPreservation === true,});}