UNPKG

nadial-logic

Version:

Core logic for NadiaL, enabling multi-round fulfillment processes, directory scanning, and contextual verification for research and project analysis.

15 lines (14 loc) 527 B
// runAdapter.js process.on('message', async ({ codePath, input }) => { try { delete require.cache[require.resolve(codePath)]; const mod = require(codePath); if (!mod || typeof mod.run !== 'function') { return process.send({ ok:false, error:'Adapter missing exported run(input) function' }); } const res = await Promise.resolve(mod.run(input)); process.send({ ok:true, data:res }); } catch (e) { process.send({ ok:false, error: e && e.stack ? e.stack : String(e) }); } });