Configuration management for the Oshun platform
At a glance#
- Path:
libs/shared/config - Domain: shared (active)
- Owner: @GreyChimp
- Docs: deep-dive · systems one-pager
- Nx project:
@oshun/config
Commands#
pnpm nx test @oshun/config
pnpm nx lint @oshun/config
<!-- Generated starting point (audit F-3): owners, replace this note with usage examples and API notes. -->
Validated getters (flags that must never fall back silently)#
Most flags are read with isFeatureEnabled / getFeatureValue, which return a
default when the variable is unset or malformed. A few select between
incompatible behaviours, where a silent default would be worse than a crash;
those get a typed getter that throws instead.
ISIS_RUNPOD_WORKER_KIND — RunPod ComfyUI worker contract#
| Value | Meaning |
|---|---|
oshun-handler (default) |
The legacy image's own handler renders the catalog server-side; the API submits workflow: <catalog id>. |
worker-comfyui |
The stock runpod/worker-comfyui image, which has no catalog renderer; the API renders the catalog to a bare ComfyUI API graph and submits that (ADR-0005). |
import { getRunPodWorkerKind } from '@oshun/config';
const kind = getRunPodWorkerKind(); // 'oshun-handler' | 'worker-comfyui'
getRunPodWorkerKind() throws on any other value, naming what it received.
The two contracts send payloads the other cannot execute, so a typo
(worker-comfy, Worker-ComfyUI) that quietly fell back to the default would
spend real GPU seconds on a job that can never run. The valid values are
exported as RUNPOD_WORKER_KINDS.
Default is oshun-handler, so the legacy path is never changed by omission.
Editing
features.ts?libs/shared/config/src/*.jsare git-tracked compiled outputs that shadow the.tssources under vitest and tsx. Rebuild the library after changing a flag, or your change will appear to have no effect.