* docs: prepare Vendoo 1.41.2 git-ignore boundary hotfix * fix: track native source modules with root-anchored runtime ignores
21 lines
655 B
JavaScript
21 lines
655 B
JavaScript
import manifest from './module.json' with { type: 'json' };
|
|
|
|
let runtime = null;
|
|
let started = false;
|
|
|
|
export function configureFluxStudioModule(deps = {}) {
|
|
runtime = { start: deps.start || (() => {}), stop: deps.stop || (() => {}) };
|
|
}
|
|
|
|
export function createFluxStudioModule() {
|
|
return {
|
|
manifest,
|
|
source: 'builtin',
|
|
lifecycle: {
|
|
async start() { if (!runtime) throw new Error('FLUX-Modul ist nicht konfiguriert.'); runtime.start(); started = true; },
|
|
async stop() { runtime?.stop(); started = false; },
|
|
async health() { return { ok: Boolean(runtime && started), native: true, worker: 'flux-prompt' }; },
|
|
},
|
|
};
|
|
}
|