1515 * singleEnvironment: boolean,
1616 * defaultOrgId?, defaultEnvironmentId?, // multi-tenant, per-hostname
1717 * features: { installLocal, marketplace, aiStudio, autoPublishAiBuilds, ... },
18- * branding: { productName, productShortName }
18+ * branding: { productName, productShortName, logoUrl, faviconUrl, brandColor, pwaDescription, pwaThemeColor }
1919 * }
2020 *
2121 * ## Feature seam (open-core boundary — cloud ADR-0012)
@@ -95,6 +95,16 @@ export interface RuntimeConfigPluginConfig {
9595 productName ?: string ;
9696 /** Short product name (PWA shortName, compact spots). Defaults to productName. */
9797 productShortName ?: string ;
98+ /** Absolute or relative URL for the product logo. Falls back to OS_LOGO_URL env var. */
99+ logoUrl ?: string ;
100+ /** Absolute or relative URL for the favicon. Falls back to OS_FAVICON_URL env var. */
101+ faviconUrl ?: string ;
102+ /** Primary brand hex color (e.g. '#4F46E5'). Falls back to OS_BRAND_COLOR env var. */
103+ brandColor ?: string ;
104+ /** PWA manifest description. Falls back to OS_PWA_DESCRIPTION env var. Default: "<productName> — runtime console". */
105+ pwaDescription ?: string ;
106+ /** PWA theme color hex. Falls back to OS_PWA_THEME_COLOR env var. Default: brandColor or '#4f46e5'. */
107+ pwaThemeColor ?: string ;
98108 /**
99109 * Distribution feature-policy hook (open-core seam — cloud ADR-0012).
100110 * Called with `undefined` for the static default (no environment resolved
@@ -123,6 +133,11 @@ export class RuntimeConfigPlugin implements Plugin {
123133 private readonly singleEnvironment : boolean ;
124134 private readonly productName : string ;
125135 private readonly productShortName : string ;
136+ private readonly logoUrl : string | undefined ;
137+ private readonly faviconUrl : string | undefined ;
138+ private readonly brandColor : string | undefined ;
139+ private readonly pwaDescription : string ;
140+ private readonly pwaThemeColor : string ;
126141 private readonly resolveFeatures ?: ( token : string | undefined ) => RuntimeFeatureOverrides ;
127142
128143 constructor ( config : RuntimeConfigPluginConfig = { } ) {
@@ -140,6 +155,16 @@ export class RuntimeConfigPlugin implements Plugin {
140155 const envShort = ( typeof process !== 'undefined' ? process . env ?. OS_PRODUCT_SHORT_NAME : undefined ) ?. trim ( ) ;
141156 this . productName = ( config . productName ?? envName ?? 'ObjectOS' ) . trim ( ) || 'ObjectOS' ;
142157 this . productShortName = ( config . productShortName ?? envShort ?? this . productName ) . trim ( ) || this . productName ;
158+ const envLogoUrl = ( typeof process !== 'undefined' ? process . env ?. OS_LOGO_URL : undefined ) ?. trim ( ) ;
159+ const envFaviconUrl = ( typeof process !== 'undefined' ? process . env ?. OS_FAVICON_URL : undefined ) ?. trim ( ) ;
160+ const envBrandColor = ( typeof process !== 'undefined' ? process . env ?. OS_BRAND_COLOR : undefined ) ?. trim ( ) ;
161+ const envPwaDescription = ( typeof process !== 'undefined' ? process . env ?. OS_PWA_DESCRIPTION : undefined ) ?. trim ( ) ;
162+ const envPwaThemeColor = ( typeof process !== 'undefined' ? process . env ?. OS_PWA_THEME_COLOR : undefined ) ?. trim ( ) ;
163+ this . logoUrl = config . logoUrl ?? envLogoUrl ;
164+ this . faviconUrl = config . faviconUrl ?? envFaviconUrl ;
165+ this . brandColor = config . brandColor ?? envBrandColor ;
166+ this . pwaDescription = config . pwaDescription ?? envPwaDescription ?? `${ this . productName } — runtime console` ;
167+ this . pwaThemeColor = config . pwaThemeColor ?? envPwaThemeColor ?? this . brandColor ?? '#4f46e5' ;
143168 }
144169
145170 init = async ( _ctx : PluginContext ) : Promise < void > => { } ;
@@ -244,6 +269,11 @@ export class RuntimeConfigPlugin implements Plugin {
244269 branding : {
245270 productName : this . productName ,
246271 productShortName : this . productShortName ,
272+ logoUrl : this . logoUrl ,
273+ faviconUrl : this . faviconUrl ,
274+ brandColor : this . brandColor ,
275+ pwaDescription : this . pwaDescription ,
276+ pwaThemeColor : this . pwaThemeColor ,
247277 } ,
248278 } ) ;
249279 } ;
0 commit comments