import { Effect } from 'effect' import type { AppContext } from '@voltro/runtime' import { EffectStore } from '@voltro/runtime' const execute = (input: { name: string }, _ctx: AppContext) => Effect.gen(function* () { const store = yield* EffectStore const row = yield* store.insert('components', { name: input.name, status: 'operational', }) return { id: row['id'] as string, name: row['name'] as string, status: row['status'] as string, } }) export default execute