Docs/Core App Startup and Runtime Env Reference
Universal Developer

Core App Startup and Runtime Env Reference

Core App Startup and Runtime Env Reference

Updated: 2026-03-23
Scope: actual process.env / import.meta.env usage in apps/core-app/src

Startup Incident Summary (Changes 1 + 2)

1) Assistant gate (fixed)

  • When TUFF_ENABLE_ASSISTANT_EXPERIMENT is off, Assistant is now handled by explicit shouldSkip.
  • It no longer goes through optional-failure handling.
  • Result: no misleading warning like Optional module failed to load: Symbol(Assistant).

2) dev.source probe + local fallback (fixed)

  • DevPluginLoader probes remote manifest.json first.
  • If remote probe fails:
    • fall back to local manifest.json + local assets for current runtime only;
    • runtime overrides dev.source=false (not persisted);
    • records DEV_SOURCE_FALLBACK_LOCAL as warning.
  • REMOTE_MANIFEST_FAILED remains fatal only when both remote and local fallback fail.

Plugin Issue Codes (quick lookup)

CodeDefault severityMeaning
MISSING_MANIFESTerrormanifest.json missing
INVALID_MANIFEST_JSONerrormanifest parse/load failed
NAME_MISMATCHerrormanifest name mismatches directory name
MANIFEST_MISSING_NAMEerrormissing name
MANIFEST_MISSING_VERSIONwarningmissing version
CATEGORY_MISSINGerrorcategory required for current sdkapi
SDKAPI_BLOCKEDerrorsdkapi below enforcement threshold
SDK_VERSION_MISSINGwarninglegacy plugin missing sdkapi
SDK_VERSION_OUTDATEDwarning/errorold sdkapi compatibility warning
PERMISSION_MISSINGwarningrequired permissions not granted
UNKNOWN_PERMISSION_IDSwarningunknown permission IDs declared
INVALID_FEATURE_COMMANDSwarninginvalid feature.commands shape
OMNI_TRANSFER_SDK_TOO_LOWwarningomniTransfer declared with low sdkapi
DUPLICATE_PLUGIN_NAMEerrorplugin name collision
LOADER_FATALerrorfatal loader exception
DEV_MODE_ACTIVEwarningrunning from dev source mode
DEV_ADDRESS_INVALIDerrorinvalid dev.address
DEV_SOURCE_DISABLED_IN_PACKAGEDwarningdev.source auto-disabled in packaged runtime
DEV_SOURCE_FALLBACK_LOCALwarningremote manifest failed, local fallback activated
REMOTE_MANIFEST_FAILEDerrorremote failed and local fallback also failed
DEV_SERVER_DISCONNECTEDwarningdev server heartbeat disconnected
LIFECYCLE_SCRIPT_FAILEDerrorprelude lifecycle script failed
RUNTIME_ERRORerrorruntime lifecycle execution error
AUTO_DISABLED_EXCESSIVE_ERRORSerrorauto-disabled after burst runtime errors
INVALID_VIEW_PATHerrorinvalid interaction/view path
PROTOCOL_NOT_ALLOWEDerrorremote http/https view blocked in production
WIDGET_UNSUPPORTED_TYPEerrorunsupported widget type
WIDGET_INVALID_DEPENDENCYerrorinvalid widget dependency
WIDGET_COMPILE_FAILEDerrorwidget compile failed

Runtime Env Variables (by category)

A. Behavior flags / configurable vars

VariablePurpose
ELECTRON_RENDERER_URLdev renderer entry URL for main windows and overlays
NODE_ENVdev/test/prod behavior branching
BUILD_TYPEbuild channel for Sentry and runtime labeling
TUFF_ENABLE_ASSISTANT_EXPERIMENTgates Assistant startup module
TUFF_ENABLE_RENDERER_OVERRIDEenables renderer override package
TUFF_DISABLE_NATIVE_OCRdisables local OCR provider
TUFF_RELEASE_API_URLoverrides release verification API base
TUFF_BUILD_SIGNATURE_URLoverrides build signature URL
TUFF_BUILD_SIGNATURE_KEY_URLoverrides build signature key URL
TUFF_UPDATE_SIGNATURE_KEY_URLupdate signature key URL (preferred)
TUFF_UPDATE_SIGNATURE_PUBLIC_KEY_URLcompatibility alias
TALEX_EVERYTHING_SDK_PATHcustom Everything SDK addon path
TALEX_FILE_PROVIDER_EXTRACT_ICONSfile icon extraction switch

B. Internal bootstrap vars

VariablePurpose
APP_VERSIONruntime app version injection
DISTruntime dist directory
PUBLICruntime public assets directory
DEBUGdebug logger switch from debug.talex file
ELECTRON_DISABLE_SECURITY_WARNINGSsuppresses Electron security warning logs
WS_NO_UTF_8_VALIDATEdisables optional ws native addon
WS_NO_BUFFER_UTILdisables optional ws native addon

C. OS-provided env vars

HOME, LANG, LOCALAPPDATA, PROGRAMFILES, PROGRAMFILES(X86), SystemRoot, USERPROFILE, WINDIR, TERM, TERMINAL are consumed as runtime OS path/shell hints.

D. Renderer build-time vars

import.meta.env.DEV and import.meta.env.MODE are consumed in renderer for dev-only UI and mode checks.

Cleanup Candidates (list only, no removal yet)

No pending cleanup candidates right now (all previously listed high/medium/low items have been completed).

Completed Cleanup

  • trace-warnings: removed runtime process.env assignment in src/main/polyfills.ts (2026-03-23).
  • unhandledrejections: removed runtime process.env assignment in src/main/polyfills.ts (2026-03-23).
  • VITE_DEV_SERVER_URL fallback in main: removed AppProvider fallback path; unified to ELECTRON_RENDERER_URL (2026-03-23).
  • TALEX_WORKFLOW_DEBUG: removed SID-bound debug toggle and file logging path in TPEX provider (2026-03-23).
  • TUFF_RELEASE_SIGNATURE_* aliases: removed legacy alias lookup; normalized to TUFF_UPDATE_* (2026-03-23).
  • TUFF_OMNIPANEL_SMOKE: removed startup smoke env gate and related probe logic (2026-03-23).
  • USE_LOCAL_NEXUS: removed PluginStoreService local Nexus env special-case; normalized to getTpexApiBase() (2026-03-23).
Was this helpful?